From 6abbc4c9daf51d0965e2b18b2d4143de7ee1c185 Mon Sep 17 00:00:00 2001 From: hengsin Date: Thu, 10 Dec 2020 23:32:07 +0800 Subject: [PATCH] IDEMPIERE-4594 Payment Selection (Manual) - NPE When Payment Date is empty (#455) Fix NPE --- .../src/org/adempiere/webui/apps/form/WPaySelect.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java index 1cad4705d9..5d637567fa 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java @@ -499,6 +499,11 @@ public class WPaySelect extends PaySelect if (m_noSelected == 0) return; + if(fieldPayDate.getComponent().getValue() == null) + { + throw new WrongValueException(fieldPayDate.getComponent(), Msg.getMsg(Env.getCtx(), "FillMandatory") + labelPayDate.getValue()); + } + String msg = generatePaySelect(miniTable, (ValueNamePair) fieldPaymentRule.getSelectedItem().getValue(), new Timestamp(fieldPayDate.getComponent().getValue().getTime()), (BankInfo)fieldBankAccount.getSelectedItem().getValue());