From e105ed338557a1e1a9f99bf36c2da77c7c9c8d54 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 9 Nov 2020 07:16:14 +0100 Subject: [PATCH] IDEMPIERE-4083 currency rate by document or by transaction (#361) Fix NPE when the field is not present in the window 13:56:08.612===========> CalloutPayment.start: start: amounts [147] java.lang.NullPointerException at org.compiere.model.CalloutPayment.amounts(CalloutPayment.java:599) --- .../src/org/compiere/model/CalloutPayment.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutPayment.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutPayment.java index 0b4b67ffaa..7fd0e57598 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutPayment.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutPayment.java @@ -590,6 +590,8 @@ public class CalloutPayment extends CalloutEngine if (colName.equals(I_C_Payment.COLUMNNAME_C_Currency_ID) || colName.equals(I_C_Payment.COLUMNNAME_PayAmt) || colName.equals(I_C_Payment.COLUMNNAME_IsOverrideCurrencyRate) ) { Boolean override = (Boolean)(colName.equals(I_C_Payment.COLUMNNAME_IsOverrideCurrencyRate) ? value : mTab.getValue(I_C_Payment.COLUMNNAME_IsOverrideCurrencyRate)); + if (override == null) + override = Boolean.FALSE; int baseCurrencyId = Env.getContextAsInt(ctx, "$C_Currency_ID"); if (baseCurrencyId == C_Currency_ID) { mTab.setValue(I_C_Payment.COLUMNNAME_IsOverrideCurrencyRate, false);