You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by terencemo <gi...@git.apache.org> on 2016/08/25 12:18:18 UTC

[GitHub] incubator-fineract pull request #219: FINERACT-37 Reschedule repayment on ho...

GitHub user terencemo opened a pull request:

    https://github.com/apache/incubator-fineract/pull/219

    FINERACT-37 Reschedule repayment on holidays+extend term

    Based on PR #110.
    Adds a WorkingDays flag extendTermForRepaymentOnHoliday when this is set
    If a repayment occurs on a holiday, shift it to the next repayment date and
    extend the loan term by the repayment interval, e.g
    if repayment is weekly and one repayment occurs on holiday, move that to the next original schedule repayment date and extend loan term by 1 week

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/terencemo/incubator-fineract i37-holidays-repayment

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-fineract/pull/219.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #219
    
----
commit b478064ac0fe74a7130b9a0c2f07a5ccd30631a5
Author: Terence Denzil Monteiro <te...@sanjosesolutions.in>
Date:   2016-08-25T12:15:14Z

    Reschedule repayment on holidays+extend term

----


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

[GitHub] incubator-fineract pull request #219: FINERACT-37 Reschedule repayment on ho...

Posted by nazeer1100126 <gi...@git.apache.org>.
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/219#discussion_r77589232
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java ---
    @@ -57,10 +57,10 @@ public LocalDate generateNextRepaymentDate(final LocalDate lastRepaymentDate, fi
                 boolean isFirstRepayment, final HolidayDetailDTO holidayDetailDTO) {
             final LocalDate firstRepaymentPeriodDate = loanApplicationTerms.getCalculatedRepaymentsStartingFromLocalDate();
             LocalDate dueRepaymentPeriodDate = null;
    +        Calendar currentCalendar = loanApplicationTerms.getLoanCalendar();
             if (isFirstRepayment && firstRepaymentPeriodDate != null) {
                 dueRepaymentPeriodDate = firstRepaymentPeriodDate;
             } else {
    -            Calendar currentCalendar = loanApplicationTerms.getLoanCalendar();
                 dueRepaymentPeriodDate = getRepaymentPeriodDate(loanApplicationTerms.getRepaymentPeriodFrequencyType(),
    --- End diff --
    
    You have removed  Calendar currentCalendar = loanApplicationTerms.getLoanCalendar(); 
    It is going to affect existing functionality


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

[GitHub] incubator-fineract pull request #219: FINERACT-37 Reschedule repayment on ho...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-fineract/pull/219


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

[GitHub] incubator-fineract issue #219: FINERACT-37 Reschedule repayment on holidays+...

Posted by nazeer1100126 <gi...@git.apache.org>.
Github user nazeer1100126 commented on the issue:

    https://github.com/apache/incubator-fineract/pull/219
  
    I believe we no need to have two boolean variables to extend the term.
    1) extendTermForDailyRepayments
    2) extendTermForRepaymentsOnHolidays 
    
    We can have a single config extendTerm. If this config is enabled, generateNextRepaymentDate method should return adjusted date


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

[GitHub] incubator-fineract issue #219: FINERACT-37 Reschedule repayment on holidays+...

Posted by nazeer1100126 <gi...@git.apache.org>.
Github user nazeer1100126 commented on the issue:

    https://github.com/apache/incubator-fineract/pull/219
  
    I agree to your point :-)


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

[GitHub] incubator-fineract pull request #219: FINERACT-37 Reschedule repayment on ho...

Posted by terencemo <gi...@git.apache.org>.
Github user terencemo commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/219#discussion_r82979521
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java ---
    @@ -96,10 +96,33 @@ public LocalDate generateNextRepaymentDate(final LocalDate lastRepaymentDate, fi
                             loanApplicationTerms.getNumberOfdays());
                 }
             }
    -        
    +        if (currentCalendar == null && holidayDetailDTO.getWorkingDays().getExtendTermForRepaymentsOnHolidays()) {
    --- End diff --
    
    Tried calling adjustRepaymentDate. It doesn't reschedule for holidays other than weekend. Went through the code of adjustRepaymentDate and found nothing that handles holidays. The code block after the if does something which I couldn't find in any existing function in the codebase.


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

[GitHub] incubator-fineract issue #219: FINERACT-37 Reschedule repayment on holidays+...

Posted by terencemo <gi...@git.apache.org>.
Github user terencemo commented on the issue:

    https://github.com/apache/incubator-fineract/pull/219
  
    extendTermForDailyRepayments flag is for a different purpose than extendTermForRepaymentsOnHolidays. There should be a way to specify which of the 2 is required and hence 2 bools. If a single bool is used, what is the behaviour if its set? Does it extend the term for both loans with daily repayment schedule and for holidays? What if the API user needs one of these 2 functionalities?


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

[GitHub] incubator-fineract pull request #219: FINERACT-37 Reschedule repayment on ho...

Posted by nazeer1100126 <gi...@git.apache.org>.
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/219#discussion_r77605384
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java ---
    @@ -96,10 +96,33 @@ public LocalDate generateNextRepaymentDate(final LocalDate lastRepaymentDate, fi
                             loanApplicationTerms.getNumberOfdays());
                 }
             }
    -        
    +        if (currentCalendar == null && holidayDetailDTO.getWorkingDays().getExtendTermForRepaymentsOnHolidays()) {
    --- End diff --
    
    if extendTermForRepaymentsOnHolidays is true, why can't we call adjustRepaymentDate method  and return that date? 


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