IDEMPIERE-3499:payment selection make NPE when hasn't bank account
This commit is contained in:
parent
4055d6db4d
commit
b8aebc75d3
|
@ -272,9 +272,11 @@ public class WPaySelect extends PaySelect
|
||||||
*/
|
*/
|
||||||
private void loadBankInfo()
|
private void loadBankInfo()
|
||||||
{
|
{
|
||||||
BankInfo bi = (BankInfo)fieldBankAccount.getSelectedItem().getValue();
|
if (fieldBankAccount.getItemCount() == 0)
|
||||||
if (bi == null)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
BankInfo bi = (BankInfo)fieldBankAccount.getSelectedItem().getValue();
|
||||||
|
|
||||||
labelCurrency.setText(bi.Currency);
|
labelCurrency.setText(bi.Currency);
|
||||||
labelBalance.setText(m_format.format(bi.Balance));
|
labelBalance.setText(m_format.format(bi.Balance));
|
||||||
|
|
||||||
|
@ -301,7 +303,13 @@ public class WPaySelect extends PaySelect
|
||||||
miniTable.setColorCompare(payDate);
|
miniTable.setColorCompare(payDate);
|
||||||
if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate);
|
if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate);
|
||||||
|
|
||||||
BankInfo bi = (BankInfo)fieldBankAccount.getSelectedItem().getValue();
|
if (fieldBankAccount.getItemCount() == 0) {
|
||||||
|
FDialog.error(m_WindowNo, form, "VPaySelectNoBank");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BankInfo bi = fieldBankAccount.getSelectedItem().getValue();
|
||||||
|
|
||||||
ValueNamePair paymentRule = (ValueNamePair) fieldPaymentRule.getSelectedItem().getValue();
|
ValueNamePair paymentRule = (ValueNamePair) fieldPaymentRule.getSelectedItem().getValue();
|
||||||
KeyNamePair bpartner = (KeyNamePair) fieldBPartner.getSelectedItem().getValue();
|
KeyNamePair bpartner = (KeyNamePair) fieldBPartner.getSelectedItem().getValue();
|
||||||
|
|
Loading…
Reference in New Issue