Skip to content

Commit

Permalink
FINERACT-1981: When paying down payment, that should not be reflected…
Browse files Browse the repository at this point in the history
… on the InterestModel
  • Loading branch information
kulminsky committed Oct 31, 2024
1 parent b053c90 commit 3ccba53
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,12 @@ private Money handlingPaymentAllocationForInterestBearingProgressiveLoan(LoanTra
paidPortion = processPaymentAllocation(paymentAllocationType, installment, loanTransaction, transactionAmountUnprocessed,
loanTransactionToRepaymentScheduleMapping, charges, balances, LoanRepaymentScheduleInstallment.PaymentAction.PAY);

if (installment.isDownPayment() || installment.getDueDate().isAfter(ctx.getModel().getMaturityDate())) {
// Skip interest and principal payment processing for down payment period or periods after loan maturity
// date
return paidPortion;
}

if (PRINCIPAL.equals(paymentAllocationType.getAllocationType())) {
emiCalculator.payPrincipal(model, installment.getDueDate(), payDate, paidPortion);
updateRepaymentPeriods(loanTransaction, ctx, model);
Expand Down

0 comments on commit 3ccba53

Please sign in to comment.