fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jroweboy <...@git.apache.org>
Subject [GitHub] incubator-fineract pull request: FINERACT-37 Reschedule payments t...
Date Thu, 12 May 2016 17:30:13 GMT
Github user jroweboy commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/110#discussion_r63062104
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java
---
    @@ -96,10 +96,37 @@ public LocalDate generateNextRepaymentDate(final LocalDate lastRepaymentDate,
fi
                             loanApplicationTerms.getNumberOfdays());
                 }
             }
    -        
    +        if (currentCalendar == null && holidayDetailDTO.getWorkingDays().getExtendTermForRepaymentsOnHolidays())
{
    +            boolean repaymentDateIsOnHoliday = false;
    +            // compile the list of holidays into Intervals to see if this date lands
on a holiday
    +            final List<Interval> holidayInterval = new ArrayList<>();
    +            for (Holiday holiday : holidayDetailDTO.getHolidays()) {
    +                holidayInterval.add(new Interval(
    +                        holiday.getFromDateLocalDate().toDateTimeAtStartOfDay(),
    +                        holiday.getToDateLocalDate().toDateTime(LocalTime.parse("23:59:59"))
    +                ));
    +            }
    +            while (intervalListContainsDate(holidayInterval, dueRepaymentPeriodDate))
{
    +                LocalDate previousDate = dueRepaymentPeriodDate;
    +                dueRepaymentPeriodDate = getRepaymentPeriodDate(loanApplicationTerms.getRepaymentPeriodFrequencyType(),
    +                        loanApplicationTerms.getRepaymentEvery(), dueRepaymentPeriodDate,
loanApplicationTerms.getNthDay(),
    +                        loanApplicationTerms.getWeekDayType());
    +                if (previousDate == dueRepaymentPeriodDate) {
    --- End diff --
    
    Hmmm... I wrote this patch 6 months ago and looking at it again, I can't remember why
I added this either. I will remove this then.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message