Cocoa-Puffs commented on code in PR #6417:
URL: https://github.com/apache/fineract/pull/6417#discussion_r3977995812
##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java:
##########
@@ -689,9 +689,18 @@ public Money
getOutstandingLoanBalanceOfPeriod(ProgressiveLoanInterestScheduleMo
@Override
public OutstandingDetails
getOutstandingAmountsTillDate(ProgressiveLoanInterestScheduleModel
scheduleModel, LocalDate targetDate) {
+ return getOutstandingAmountsTillDate(scheduleModel, targetDate, false);
+ }
+
+ @Override
+ public OutstandingDetails
getOutstandingAmountsTillDate(ProgressiveLoanInterestScheduleModel
scheduleModel, LocalDate targetDate,
+ boolean fixedInterestTillDate) {
MathContext mc = scheduleModel.mc();
ProgressiveLoanInterestScheduleModel scheduleModelCopy =
scheduleModel.deepCopy(mc);
calculateRateFactorForScheduleTillDateInclusive(scheduleModelCopy,
targetDate);
+ if (fixedInterestTillDate) {
+ scaleFixedInterestTillDate(scheduleModelCopy, targetDate);
Review Comment:
Good call. I've applied it. You're right that the lowered floor propagates:
EMI caps the reported due interest, so scaling first was under-reporting.
Measured on re-amortization with EQUAL_AMORTIZATION_INTEREST_SPLIT it was
reporting 6.46 against 9.68 of actual accrual activity. Scaling after the EMI
pass gives 9.68 vs 9.68. Re-age was unaffected (5.77 both ways). Still takes
effect after the pass because Memo invalidates on fixedInterest's hash, which
is in the dependency arrays of calculatedDueInterestCalculation and
dueInterestCalculation.
--
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]