[ 1702235 ] Voided Bank Statement should recover the balance

This commit is contained in:
armenrz 2008-08-07 05:19:45 +00:00
parent 7e58933bde
commit 9af52f43e9
1 changed files with 7 additions and 0 deletions

View File

@ -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++)