IDEMPIERE-2605 Bypass Product Qty checks/warnings in CalloutOrder when order is DropShip / based on patch from Carlin Reed (creed.gds)

This commit is contained in:
Carlos Ruiz 2015-05-13 11:18:09 -05:00
parent 9ddf246452
commit ac460b523a
1 changed files with 2 additions and 2 deletions

View File

@ -837,7 +837,7 @@ public class CalloutOrder extends CalloutEngine
if (Env.isSOTrx(ctx, WindowNo)) if (Env.isSOTrx(ctx, WindowNo))
{ {
MProduct product = MProduct.get (ctx, M_Product_ID.intValue()); MProduct product = MProduct.get (ctx, M_Product_ID.intValue());
if (product.isStocked()) if (product.isStocked() && Env.getContext(ctx, WindowNo, "IsDropShip").equals("N"))
{ {
BigDecimal QtyOrdered = (BigDecimal)mTab.getValue("QtyOrdered"); BigDecimal QtyOrdered = (BigDecimal)mTab.getValue("QtyOrdered");
int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_ID"); int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_ID");
@ -1324,7 +1324,7 @@ public class CalloutOrder extends CalloutEngine
&& QtyOrdered.signum() > 0) // no negative (returns) && QtyOrdered.signum() > 0) // no negative (returns)
{ {
MProduct product = MProduct.get (ctx, M_Product_ID); MProduct product = MProduct.get (ctx, M_Product_ID);
if (product.isStocked()) if (product.isStocked() && Env.getContext(ctx, WindowNo, "IsDropShip").equals("N"))
{ {
int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_ID"); int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_ID");
int M_AttributeSetInstance_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "M_AttributeSetInstance_ID"); int M_AttributeSetInstance_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "M_AttributeSetInstance_ID");