[ 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

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