mariowise commented on code in PR #6352:
URL: https://github.com/apache/fineract/pull/6352#discussion_r4030461973


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java:
##########
@@ -1835,6 +1785,9 @@ public EmiAdjustment getEmiAdjustment(final 
List<RepaymentPeriod> repaymentPerio
         for (int idx = repaymentPeriods.size() - 1; idx > 0; --idx) {
             RepaymentPeriod lastPeriod = repaymentPeriods.get(idx);
             RepaymentPeriod penultimatePeriod = repaymentPeriods.get(idx - 1);
+            if (lastPeriod.isPrincipalPaymentGrace() || 
penultimatePeriod.isPrincipalPaymentGrace()) {

Review Comment:
   Agreed on the gate, `shouldBeAdjusted()` now uses `numberOfRelatedPeriods() 
- uncountablePeriods`. For N-1 that is floor(1 / 2) = 0, so a lone balloon 
period is not equalized. I kept the skip though, without it there is still 
could be a case where a pair (amortizing, grace) is evaluated once later 
installments are already paid. The skip makes sure that pair is ineligible.



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