diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java index 872ef64dfd..b8d63fa134 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java @@ -539,12 +539,13 @@ public class CalloutInvoice extends CalloutEngine // Product Qty changed - recalc price else if ((mField.getColumnName().equals("QtyInvoiced") || mField.getColumnName().equals("QtyEntered") + || mField.getColumnName().equals("C_UOM_ID") || mField.getColumnName().equals("M_Product_ID")) && !"N".equals(Env.getContext(ctx, WindowNo, "DiscountSchema"))) { int C_BPartner_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_ID"); if (mField.getColumnName().equals("QtyEntered")) - QtyInvoiced = MUOMConversion.convertProductTo (ctx, M_Product_ID, + QtyInvoiced = MUOMConversion.convertProductFrom (ctx, M_Product_ID, C_UOM_To_ID, QtyEntered); if (QtyInvoiced == null) QtyInvoiced = QtyEntered; diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java index 056e171178..9b8c94abd2 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java @@ -1036,12 +1036,13 @@ public class CalloutOrder extends CalloutEngine // Product Qty changed - recalc price else if ((mField.getColumnName().equals("QtyOrdered") || mField.getColumnName().equals("QtyEntered") + || mField.getColumnName().equals("C_UOM_ID") || mField.getColumnName().equals("M_Product_ID")) && !"N".equals(Env.getContext(ctx, WindowNo, "DiscountSchema"))) { int C_BPartner_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_ID"); if (mField.getColumnName().equals("QtyEntered")) - QtyOrdered = MUOMConversion.convertProductTo (ctx, M_Product_ID, + QtyOrdered = MUOMConversion.convertProductFrom (ctx, M_Product_ID, C_UOM_To_ID, QtyEntered); if (QtyOrdered == null) QtyOrdered = QtyEntered;