FINERACT-1981: pay-off transaction for progressive loans
This commit is contained in:
committed by
Adam Saghy
parent
5ebd3429c6
commit
80f4627623
+2
-2
@@ -264,10 +264,10 @@ public class ProgressiveLoanScheduleGenerator implements LoanScheduleGenerator {
|
||||
log.debug("calculating prepayment amount till rest frequency date (Strategy B)");
|
||||
OutstandingAmountsDTO outstandingAmounts = new OutstandingAmountsDTO(currency);
|
||||
loan.getRepaymentScheduleInstallments().forEach(installment -> {
|
||||
boolean isPayoffAfterInstallmentFrom = installment.getFromDate().isAfter(onDate);
|
||||
boolean isPayoffBeforeInstallment = installment.getFromDate().isBefore(onDate);
|
||||
|
||||
outstandingAmounts.plusPrincipal(installment.getPrincipalOutstanding(currency));
|
||||
if (!isPayoffAfterInstallmentFrom) {
|
||||
if (isPayoffBeforeInstallment) {
|
||||
outstandingAmounts.plusInterest(installment.getInterestOutstanding(currency));
|
||||
} else {
|
||||
log.debug("Payoff after installment {}, not counting interest", installment.getDueDate());
|
||||
|
||||
Reference in New Issue
Block a user