IDEMPIERE-2575 BOM functionality sales order
This commit is contained in:
parent
60c119b304
commit
a40c7109c1
|
@ -1605,7 +1605,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
// New Lines
|
// New Lines
|
||||||
int lineNo = line.getLine ();
|
int lineNo = line.getLine ();
|
||||||
//find default BOM with valid dates and to this product
|
//find default BOM with valid dates and to this product
|
||||||
MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDatePromised(), get_TrxName());
|
/*/MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDatePromised(), get_TrxName());
|
||||||
if(bom != null)
|
if(bom != null)
|
||||||
{
|
{
|
||||||
MPPProductBOMLine[] bomlines = bom.getLines(getDatePromised());
|
MPPProductBOMLine[] bomlines = bom.getLines(getDatePromised());
|
||||||
|
@ -1624,30 +1624,30 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
newLine.setPrice ();
|
newLine.setPrice ();
|
||||||
newLine.save (get_TrxName());
|
newLine.save (get_TrxName());
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
|
|
||||||
/*MProductBOM[] boms = MProductBOM.getBOMLines (product);
|
MProductBOM[] boms = MProductBOM.getBOMLines (product);
|
||||||
for (int j = 0; j < boms.length; j++)
|
for (int j = 0; j < boms.length; j++)
|
||||||
{
|
{
|
||||||
//MProductBOM bom = boms[j];
|
MProductBOM bom = boms[j];
|
||||||
MPPProductBOMLine bom = boms[j];
|
//MPPProductBOMLine bom = boms[j];
|
||||||
MOrderLine newLine = new MOrderLine (this);
|
MOrderLine newLine = new MOrderLine (this);
|
||||||
newLine.setLine (++lineNo);
|
newLine.setLine (++lineNo);
|
||||||
//newLine.setM_Product_ID (bom.getProduct ()
|
//newLine.setM_Product_ID (bom.getProduct ()
|
||||||
// .getM_Product_ID ());
|
// .getM_Product_ID ());
|
||||||
newLine.setM_Product_ID (bom.getM_Product_ID ());
|
newLine.setM_Product_ID (bom.getM_Product_ID ());
|
||||||
//newLine.setC_UOM_ID (bom.getProduct ().getC_UOM_ID ());
|
newLine.setC_UOM_ID (bom.getProduct ().getC_UOM_ID ());
|
||||||
newLine.setC_UOM_ID (bom.getC_UOM_ID ());
|
//newLine.setC_UOM_ID (bom.getC_UOM_ID ());
|
||||||
//newLine.setQty (line.getQtyOrdered ().multiply (
|
|
||||||
// bom.getBOMQty ()));
|
|
||||||
newLine.setQty (line.getQtyOrdered ().multiply (
|
newLine.setQty (line.getQtyOrdered ().multiply (
|
||||||
bom.getQtyBOM()));
|
bom.getBOMQty ()));
|
||||||
|
//newLine.setQty (line.getQtyOrdered ().multiply (
|
||||||
|
// bom.getQtyBOM()));
|
||||||
if (bom.getDescription () != null)
|
if (bom.getDescription () != null)
|
||||||
newLine.setDescription (bom.getDescription ());
|
newLine.setDescription (bom.getDescription ());
|
||||||
//
|
//
|
||||||
newLine.setPrice ();
|
newLine.setPrice ();
|
||||||
newLine.save (get_TrxName());
|
newLine.save (get_TrxName());
|
||||||
}*/
|
}
|
||||||
|
|
||||||
// Convert into Comment Line
|
// Convert into Comment Line
|
||||||
line.setM_Product_ID (0);
|
line.setM_Product_ID (0);
|
||||||
|
|
Loading…
Reference in New Issue