[ 1702235 ] Voided Bank Statement should recover the balance
This commit is contained in:
parent
7e58933bde
commit
9af52f43e9
|
@ -463,6 +463,13 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
|||
return false; // could not delete
|
||||
}
|
||||
|
||||
//Added Lines by AZ Goodwill
|
||||
//Restore Bank Account Balance
|
||||
MBankAccount ba = MBankAccount.get(getCtx(), getC_BankAccount_ID());
|
||||
ba.setCurrentBalance(ba.getCurrentBalance().subtract(getStatementDifference()));
|
||||
ba.save(get_TrxName());
|
||||
//End of Added Lines
|
||||
|
||||
// Set lines to 0
|
||||
MBankStatementLine[] lines = getLines(true);
|
||||
for (int i = 0; i < lines.length; i++)
|
||||
|
|
Loading…
Reference in New Issue