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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java:
##########
@@ -104,6 +104,12 @@ public LocalDate generateNextRepaymentDate(final LocalDate 
lastRepaymentDate, fi
             }
         }
 
+        final LocalDate maxDateForFixedLength = 
loanApplicationTerms.calculateMaxDateForFixedLength();
+        // Fixed Length validation
+        if (maxDateForFixedLength != null && 
DateUtils.isAfter(dueRepaymentPeriodDate, maxDateForFixedLength)) {

Review Comment:
   I dont think this is righ. I reckon we might have validation to avoid such 
situation where we are adjusting not the last repayment, but still this is not 
checking whether it is the latest or not. 
   
   Also i dont think we need this here... Its more than enough to adjust the 
loan end date and the very last installment due date.



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