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();
|
maxDate = line.getDateAcct();
|
||||||
}
|
}
|
||||||
setStatementDifference(total);
|
setStatementDifference(total);
|
||||||
//AZ Goodwill
|
|
||||||
//refresh current balance
|
|
||||||
MBankAccount ba = MBankAccount.get(getCtx(), getC_BankAccount_ID());
|
|
||||||
setBeginningBalance(ba.getCurrentBalance());
|
|
||||||
//end AZ
|
|
||||||
setEndingBalance(getBeginningBalance().add(total));
|
setEndingBalance(getBeginningBalance().add(total));
|
||||||
if (!MPeriod.isOpen(getCtx(), minDate, MDocType.DOCBASETYPE_BankStatement)
|
if (!MPeriod.isOpen(getCtx(), minDate, MDocType.DOCBASETYPE_BankStatement)
|
||||||
|| !MPeriod.isOpen(getCtx(), maxDate, MDocType.DOCBASETYPE_BankStatement))
|
|| !MPeriod.isOpen(getCtx(), maxDate, MDocType.DOCBASETYPE_BankStatement))
|
||||||
|
@ -465,13 +460,6 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
||||||
return false; // could not delete
|
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
|
// Set lines to 0
|
||||||
MBankStatementLine[] lines = getLines(true);
|
MBankStatementLine[] lines = getLines(true);
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
|
|
Loading…
Reference in New Issue