IDEMPIERE-4594 Payment Selection (Manual) - NPE When Payment Date is empty (#455)

Fix NPE
This commit is contained in:
hengsin 2020-12-10 23:32:07 +08:00 committed by GitHub
parent 4d96ac1f8e
commit 6abbc4c9da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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());