adamsaghy commented on code in PR #5360:
URL: https://github.com/apache/fineract/pull/5360#discussion_r2721098213
##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java:
##########
@@ -1104,7 +1104,12 @@ private void
calculateLastUnpaidRepaymentPeriodEMI(ProgressiveLoanInterestSchedu
Money diff = totalDisbursedAmount.plus(totalCapitalizedIncome,
mc).plus(scheduleModel.getTotalCreditedPrincipal(), mc)
.plus(totalDueInterest, mc).minus(totalEMI, mc);
- repaymentPeriod.setEmi(repaymentPeriod.getEmi().add(diff, mc));
+ Money adjustedEmi = repaymentPeriod.getEmi().add(diff, mc);
+ if (repaymentPeriod.getFixedInterest().isGreaterThanZero()
+ &&
adjustedEmi.isLessThan(repaymentPeriod.getPaidPrincipal().add(repaymentPeriod.getFixedInterest())))
{
+ adjustedEmi =
repaymentPeriod.getPaidPrincipal().add(repaymentPeriod.getFixedInterest());
+ }
Review Comment:
Why is this needed? The fixed interest rate is part of the calculated
interest period interest. why to consider here again?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]