Fix [1902240] BanksStatement beggining balance not working
This commit is contained in:
parent
358e5bc4ab
commit
a6668e11b9
|
@ -326,11 +326,6 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
|||
maxDate = line.getDateAcct();
|
||||
}
|
||||
setStatementDifference(total);
|
||||
//AZ Goodwill
|
||||
//refresh current balance
|
||||
MBankAccount ba = MBankAccount.get(getCtx(), getC_BankAccount_ID());
|
||||
setBeginningBalance(ba.getCurrentBalance());
|
||||
//end AZ
|
||||
setEndingBalance(getBeginningBalance().add(total));
|
||||
if (!MPeriod.isOpen(getCtx(), minDate, MDocType.DOCBASETYPE_BankStatement)
|
||||
|| !MPeriod.isOpen(getCtx(), maxDate, MDocType.DOCBASETYPE_BankStatement))
|
||||
|
@ -464,13 +459,6 @@ 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
|
||||
//Recover Bank Account
|
||||
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