adamsaghy commented on code in PR #4294:
URL: https://github.com/apache/fineract/pull/4294#discussion_r1949812986


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProgressiveLoanInterestScheduleModel.java:
##########
@@ -201,7 +201,10 @@ Optional<RepaymentPeriod> 
findRepaymentPeriodForBalanceChange(final LocalDate ba
     private Consumer<RepaymentPeriod> 
updateInterestPeriodOnRepaymentPeriod(final LocalDate balanceChangeDate, final 
Money disbursedAmount,
             final Money correctionAmount) {
         return repaymentPeriod -> {
-            final Optional<InterestPeriod> interestPeriodOptional = 
findInterestPeriodForBalanceChange(repaymentPeriod, balanceChangeDate);
+            final boolean isChangeOnMaturityDate = 
isLastRepaymentPeriod(repaymentPeriod)
+                    && balanceChangeDate.isEqual(repaymentPeriod.getDueDate());
+            final Optional<InterestPeriod> interestPeriodOptional = 
findInterestPeriodForBalanceChange(repaymentPeriod, balanceChangeDate,
+                    isChangeOnMaturityDate);

Review Comment:
   What is this new flag?



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