adamsaghy commented on code in PR #3651:
URL: https://github.com/apache/fineract/pull/3651#discussion_r1438868248
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java:
##########
@@ -423,6 +427,87 @@ private LoanScheduleModel generate(final MathContext mc,
final LoanApplicationTe
scheduleParams.getTotalRepaymentExpected().getAmount(),
totalOutstanding);
}
+ private void addChargesOnlyRepaymentSchedule(MonetaryCurrency currency,
LoanScheduleParams scheduleParams,
+ List<LoanScheduleModelPeriod> periods, Set<LoanCharge>
loanCharges, MathContext mc, LoanApplicationTerms loanApplicationTerms,
+ Collection<RecalculationDetail> transactions,
+ LoanRepaymentScheduleTransactionProcessor
loanRepaymentScheduleTransactionProcessor, final HolidayDetailDTO
holidayDetailDTO,
+ final LocalDate lastRestDate, final LocalDate firstRepaymentDate,
final LocalDate idealDisbursementDate) {
+ if (periods.size() > 0) {
+ LoanScheduleModelPeriod lastInstallment =
periods.get(periods.size() - 1);
+ // get end date for the schedule from loan charges
+ LocalDate scheduleDueDate = null;
+ if
(!(BigDecimal.ZERO.compareTo(loanApplicationTerms.getAnnualNominalInterestRate())
< 0)) {
+ for (final LoanCharge loanCharge : loanCharges) {
+ if (loanCharge.isSpecifiedDueDate() &&
DateUtils.isAfter(loanCharge.getDueDate(), lastInstallment.periodDueDate())) {
+ scheduleDueDate = loanCharge.getDueDate();
+ }
+ }
+ }
+ if (scheduleDueDate != null) {
+ final Collection<LoanTermVariationsData> interestRates =
loanApplicationTerms.getLoanTermVariations()
+ .getInterestRateChanges();
+
+ LocalDate periodStartDateApplicableForInterest =
calculateInterestStartDateForPeriod(loanApplicationTerms,
Review Comment:
I dont think we need to calculate interest after maturity date. @bharathc27
Thoughts?
--
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]