adamsaghy commented on code in PR #3836:
URL: https://github.com/apache/fineract/pull/3836#discussion_r1543234638
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractProgressiveLoanScheduleGenerator.java:
##########
@@ -181,6 +181,13 @@ public LoanScheduleModel generate(final MathContext mc,
final LoanApplicationTer
// }
}
+ // Fixed Length validation
+ final int lastPeriodIdx = periods.size() - 1;
+ LoanScheduleModelRepaymentPeriod lastPeriod =
(LoanScheduleModelRepaymentPeriod) periods.get(lastPeriodIdx);
+ if (lastPeriod.getDueDate().compareTo(loanEndDate) != 0) {
Review Comment:
With reschedule, i dont think it will work... :/
Based on the periodNumber of scheduleParams, you can decide in the
"nextRepaymentDate()" method of DefaultScheduledDateGenerator, whether it is
the last installment or not and you can set the proper repayment date. After
that if the installment was rescheduled, that date would be overriden, but i
guess that is fine.
What do you think?
--
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]