FINERACT-1971: Fixing obligation met on date when adding charge after maturity

This commit is contained in:
Peter Bagrij
2023-10-30 19:07:51 +01:00
committed by Adam Saghy
parent 9b2c24289c
commit 71d2e51051
2 changed files with 72 additions and 0 deletions
@@ -388,6 +388,13 @@ public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implemen
if (lastInstallment.isAdditional() && lastInstallment.getDue(currency).isZero()) {
installments.remove(lastInstallment);
}
// TODO: rewrite and handle it at the proper place when disbursement handling got fixed
for (LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment : installments) {
if (loanRepaymentScheduleInstallment.getTotalOutstanding(currency).isGreaterThanZero()) {
loanRepaymentScheduleInstallment.updateObligationMet(false);
loanRepaymentScheduleInstallment.updateObligationMetOnDate(null);
}
}
}
private void recalculateCreditTransaction(ChangedTransactionDetail changedTransactionDetail, LoanTransaction loanTransaction,