FINERACT-1981: Pay-off does not consider the overdue installments

This commit is contained in:
Andrii Kulminskyi
2024-10-29 21:53:07 +01:00
committed by Adam Saghy
parent 94360c9f8a
commit f92290b355
3 changed files with 250 additions and 0 deletions
@@ -274,6 +274,9 @@ public class ProgressiveLoanScheduleGenerator implements LoanScheduleGenerator {
.principal(result.getOutstandingBalance()) //
.interest(result.getPayableInterest());
installments.stream().filter(installment -> installment.getDueDate().isBefore(onDate))
.forEach(installment -> amounts.plusInterest(installment.getInterestOutstanding(currency)));
installments.forEach(installment -> amounts //
.plusFeeCharges(installment.getFeeChargesOutstanding(currency))
.plusPenaltyCharges(installment.getPenaltyChargesOutstanding(currency)));