janez89 commented on code in PR #4244:
URL: https://github.com/apache/fineract/pull/4244#discussion_r1923398351


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java:
##########
@@ -778,6 +785,13 @@ public Money 
getSumOfDueInterestsOnDate(ProgressiveLoanInterestScheduleModel sch
                 .reduce(scheduleModel.zero(), Money::add); //
     }
 
+    @Override
+    public void applyInterestPause(final ProgressiveLoanInterestScheduleModel 
scheduleModel, final LocalDate fromDate,
+            final LocalDate endDate, final BigDecimal newInterestRate) {
+        scheduleModel.updateInterestPeriodsWithInterestPause(fromDate, 
endDate, scheduleModel.zero(), scheduleModel.zero())
+                .forEach(repaymentPeriod -> 
calculateRateFactorsForInterestPause(scheduleModel));

Review Comment:
   You have to rethink this part. Previous similar methods work a little 
different way.
   In this case, you don't have to give back repayment periods, just only one. 
Progressive means we apply changes from an exact date and recalculate until the 
end. So you need a due date and pass that to your calculate method and that 
will be the start date. See: `changeInterestRate` method.



-- 
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]

Reply via email to