FINERACT-2354: Re-age - Excess payment handling - Default Behavior, interestRecalculation = true

This commit is contained in:
mariiaKraievska
2025-12-01 13:15:42 +01:00
committed by Adam Saghy
parent 2bde43ea83
commit b18912cc9d
11 changed files with 1696 additions and 567 deletions
@@ -278,6 +278,13 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
null, null, null, false, false, true);
}
public static LoanRepaymentScheduleInstallment newInstallmentWithMovedPaidAmountDuringReAging(final Loan loan,
final Integer installmentNumber, final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principal,
final BigDecimal interest) {
return new LoanRepaymentScheduleInstallment(loan, installmentNumber, fromDate, dueDate, principal, interest, null, null, null, null,
null, null, false, false, false);
}
public static LoanRepaymentScheduleInstallment getLastNonDownPaymentInstallment(List<LoanRepaymentScheduleInstallment> installments) {
return installments.stream().filter(i -> !i.isDownPayment()).reduce((first, second) -> second).orElseThrow();
}