[ 1702235 ] Voided Bank Statement should recover the balance
This commit is contained in:
parent
7e58933bde
commit
9af52f43e9
|
@ -462,6 +462,13 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
|||
if (MFactAcct.delete(Table_ID, getC_BankStatement_ID(), get_TrxName()) < 0)
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue