if(bom != null)
{
MPPProductBOMLine[] bomlines = bom.getLines(getDateInvoiced());
for (int j = 0; j < bomlines.length; j++)
{
MPPProductBOMLine bomline = bomlines[j];
MInvoiceLine newLine = new MInvoiceLine (this);
newLine.setLine (++lineNo);
newLine.setM_Product_ID (bomline.getM_Product_ID ());
newLine.setC_UOM_ID (bomline.getC_UOM_ID ());
newLine.setQty (line.getQtyInvoiced().multiply(
bomline.getQtyBOM ())); // Invoiced/Entered
if (bomline.getDescription () != null)
newLine.setDescription (bomline.getDescription ());
//
newLine.setPrice ();
newLine.saveEx (get_TrxName());
}
}