From 81dfbfc7a211044b88d631efb8257e2afe3f7cbd Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 12 Aug 2009 03:21:45 +0000 Subject: [PATCH] FR [2835991] - Charge Lines cannot be "shipped" manually https://sourceforge.net/tracker/?func=detail&aid=2835991&group_id=176962&atid=879335 --- base/src/org/compiere/model/CalloutInOut.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/base/src/org/compiere/model/CalloutInOut.java b/base/src/org/compiere/model/CalloutInOut.java index 4af9792210..c0d7891acf 100644 --- a/base/src/org/compiere/model/CalloutInOut.java +++ b/base/src/org/compiere/model/CalloutInOut.java @@ -337,8 +337,13 @@ public class CalloutInOut extends CalloutEngine MOrderLine ol = new MOrderLine (ctx, C_OrderLine_ID.intValue(), null); if (ol.get_ID() != 0) { - mTab.setValue("M_Product_ID", new Integer(ol.getM_Product_ID())); - mTab.setValue("M_AttributeSetInstance_ID", new Integer(ol.getM_AttributeSetInstance_ID())); + if (ol.getC_Charge_ID() > 0 && ol.getM_Product_ID() <= 0) { + mTab.setValue("C_Charge_ID", new Integer(ol.getC_Charge_ID())); + } + else { + mTab.setValue("M_Product_ID", new Integer(ol.getM_Product_ID())); + mTab.setValue("M_AttributeSetInstance_ID", new Integer(ol.getM_AttributeSetInstance_ID())); + } // mTab.setValue("C_UOM_ID", new Integer(ol.getC_UOM_ID())); BigDecimal MovementQty = ol.getQtyOrdered().subtract(ol.getQtyDelivered());