if using different conversion type from default, Invoice and Material Receipt can't match. Because Invoice create fact with specific conversion type, but receipt always conversion type is 0 ( use default)
//Doc_InOut , private DocLine loadLines(MInOut inout)
//added conversiontype from order docLine.setC_ConversionType_ID(inout.getC_Order().getC_ConversionType_ID());
Hi , in this case if the order has a different conversion type than the invoice they also won't match.
Also, there can be material receipts not related to an order.