1008183 C_BankAccount.CurrentBalance is updated when Drafted Bank Statement is voided (IDEMPIERE-3414)

This commit is contained in:
Carlos Ruiz 2017-06-29 21:41:49 +02:00
parent 5625e27627
commit 680cf7f5a7
1 changed files with 11 additions and 9 deletions

View File

@ -454,13 +454,15 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
MFactAcct.deleteEx(Table_ID, getC_BankStatement_ID(), get_TrxName()); MFactAcct.deleteEx(Table_ID, getC_BankStatement_ID(), get_TrxName());
} }
//Added Lines by AZ Goodwill if (isProcessed()) {
//Restore Bank Account Balance //Added Lines by AZ Goodwill
MBankAccount ba = getBankAccount(); //Restore Bank Account Balance
ba.load(get_TrxName()); MBankAccount ba = getBankAccount();
ba.setCurrentBalance(ba.getCurrentBalance().subtract(getStatementDifference())); ba.load(get_TrxName());
ba.saveEx(); ba.setCurrentBalance(ba.getCurrentBalance().subtract(getStatementDifference()));
//End of Added Lines ba.saveEx();
//End of Added Lines
}
// Set lines to 0 // Set lines to 0
MBankStatementLine[] lines = getLines(true); MBankStatementLine[] lines = getLines(true);