From 4740efdb9071d325dd0c1466ff35399df848d96d Mon Sep 17 00:00:00 2001 From: hieplq Date: Thu, 6 Feb 2014 20:35:53 +0700 Subject: [PATCH] IDEMPIERE-1738: - at allocate, invoice_id don't set into env varial, because some callout is stop working --- .../src/org/compiere/model/CalloutPaymentAllocate.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutPaymentAllocate.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutPaymentAllocate.java index 30d5ff6c21..f02ea7bdd1 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutPaymentAllocate.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutPaymentAllocate.java @@ -109,7 +109,7 @@ public class CalloutPaymentAllocate extends CalloutEngine mTab.setValue("Amount", InvoiceOpen.subtract(DiscountAmt)); mTab.setValue("DiscountAmt", DiscountAmt); // reset as dependent fields get reset - Env.setContext(ctx, WindowNo, "C_Invoice_ID", C_Invoice_ID.toString()); + Env.setContext(ctx, WindowNo, mTab.getTabNo(), "C_Invoice_ID", C_Invoice_ID.toString()); mTab.setValue("C_Invoice_ID", C_Invoice_ID); } } @@ -146,8 +146,8 @@ public class CalloutPaymentAllocate extends CalloutEngine { if (isCalloutActive()) // assuming it is resetting value return ""; - // No Invoice - int C_Invoice_ID = Env.getContextAsInt(ctx, WindowNo, "C_Invoice_ID"); + // No Invoice + int C_Invoice_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "C_Invoice_ID"); if (C_Invoice_ID == 0) return ""; // Get Info from Tab @@ -173,8 +173,8 @@ public class CalloutPaymentAllocate extends CalloutEngine // PayAmt - calculate write off if (colName.equals("Amount")) { - WriteOffAmt = InvoiceAmt.subtract(Amount).subtract(DiscountAmt).subtract(OverUnderAmt); - mTab.setValue("WriteOffAmt", WriteOffAmt); + OverUnderAmt = InvoiceAmt.subtract(Amount).subtract(DiscountAmt).subtract(WriteOffAmt); + mTab.setValue("OverUnderAmt", OverUnderAmt); } else // calculate Amount {