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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java:
##########
@@ -46,15 +45,22 @@ public LocalDate getLastRepaymentDate(final 
LoanApplicationTerms loanApplication
 
         final int numberOfRepayments = 
loanApplicationTerms.getNumberOfRepayments();
 
-        RepaymentStartDateType repaymentStartDateType = 
loanApplicationTerms.getRepaymentStartDateType();
+        LocalDate lastRepaymentDate = 
loanApplicationTerms.getRepaymentStartDate();
+        final LocalDate maxDateForFixedLength = 
loanApplicationTerms.calculateMaxDateForFixedLength();
 
-        LocalDate lastRepaymentDate = 
RepaymentStartDateType.DISBURSEMENT_DATE.equals(repaymentStartDateType)
-                ? loanApplicationTerms.getExpectedDisbursementDate()
-                : loanApplicationTerms.getSubmittedOnDate();
         boolean isFirstRepayment = true;
         for (int repaymentPeriod = 1; repaymentPeriod <= numberOfRepayments; 
repaymentPeriod++) {
             lastRepaymentDate = generateNextRepaymentDate(lastRepaymentDate, 
loanApplicationTerms, isFirstRepayment);
             isFirstRepayment = false;
+            // Fixed Length validation - When the Number of Repayments is 
greater than Fixed Length

Review Comment:
   Please correct these comments. This has nothing to do with the number of 
repayments... it checks whether the last repaymentDate is greater than the 
fixedLengthDate...



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