From a40c7109c10ef91f4f09f26d09989f3d4b441b0f Mon Sep 17 00:00:00 2001 From: michal_zilincar Date: Sun, 12 Apr 2015 14:28:09 -0500 Subject: [PATCH] IDEMPIERE-2575 BOM functionality sales order --- .../src/org/compiere/model/MOrder.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 4462c3e6d6..c94dcd62c2 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -1605,7 +1605,7 @@ public class MOrder extends X_C_Order implements DocAction // New Lines int lineNo = line.getLine (); //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) { MPPProductBOMLine[] bomlines = bom.getLines(getDatePromised()); @@ -1624,30 +1624,30 @@ public class MOrder extends X_C_Order implements DocAction newLine.setPrice (); newLine.save (get_TrxName()); } - } + } */ - /*MProductBOM[] boms = MProductBOM.getBOMLines (product); + MProductBOM[] boms = MProductBOM.getBOMLines (product); for (int j = 0; j < boms.length; j++) { - //MProductBOM bom = boms[j]; - MPPProductBOMLine bom = boms[j]; + MProductBOM bom = boms[j]; + //MPPProductBOMLine bom = boms[j]; MOrderLine newLine = new MOrderLine (this); newLine.setLine (++lineNo); //newLine.setM_Product_ID (bom.getProduct () // .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.getC_UOM_ID ()); - //newLine.setQty (line.getQtyOrdered ().multiply ( - // bom.getBOMQty ())); + newLine.setC_UOM_ID (bom.getProduct ().getC_UOM_ID ()); + //newLine.setC_UOM_ID (bom.getC_UOM_ID ()); newLine.setQty (line.getQtyOrdered ().multiply ( - bom.getQtyBOM())); + bom.getBOMQty ())); + //newLine.setQty (line.getQtyOrdered ().multiply ( + // bom.getQtyBOM())); if (bom.getDescription () != null) newLine.setDescription (bom.getDescription ()); // newLine.setPrice (); newLine.save (get_TrxName()); - }*/ + } // Convert into Comment Line line.setM_Product_ID (0);