[ 
https://issues.apache.org/jira/browse/FINERACT-2972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18129227#comment-18129227
 ] 

Adam Saghy commented on FINERACT-2972:
--------------------------------------

[~marlop] FYI

> Progressive loans only move last due date off non-working days
> --------------------------------------------------------------
>
>                 Key: FINERACT-2972
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2972
>             Project: Apache Fineract
>          Issue Type: Improvement
>          Components: Loan
>    Affects Versions: 1.16.0
>            Reporter: Adam Saghy
>            Assignee: Adam Saghy
>            Priority: Major
>             Fix For: 1.17.0
>
>
> When working days are configured with “move to next working day”, progressive 
> loans only adjust the last installment’s due date. Every earlier due date 
> that lands on a non-working day stays there. Cumulative loans with the same 
> setup move every affected installment, so the two schedule types disagree.
> The cause is DefaultScheduledDateGenerator.generateRepaymentPeriods, which 
> calls adjustRepaymentDate only for the last period (repaymentPeriodNumber == 
> numberOfRepayments). The loop came in with the progressive EMI calculation 
> (FINERACT-1981) and looks copied from getLastRepaymentDate, which only ever 
> adjusts the maturity date. No test, comment or documentation says progressive 
> loans are meant to skip the adjustment.
> This applies to every progressive loan, whatever its monthEndDueDateStrategy. 
> Fixing it changes due dates, period lengths and interest for existing 
> progressive loans on tenants with non-working days, so the expected behaviour 
> should be agreed before changing it.
> *Steps to reproduce*
>  # Set working days to Monday–Friday with reschedule type “move to next 
> working day” (PUT /workingdays, recurrence: 
> FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR, repaymentRescheduleType: 2).
>  # Set the business date to 15 January 2025.
>  # Create a progressive loan product with monthly repayments: repay every 1 
> month, 3 repayments, advanced payment allocation.
>  # Submit, approve and disburse a loan on 15 January 2025.
>  # Check the repayment schedule.
>  # Repeat steps 3–5 with a cumulative product that is otherwise the same.
> *Expected:* both loans are due 17 Feb 2025, 17 Mar 2025 and 15 Apr 2025. 15 
> Feb and 15 Mar 2025 are Saturdays, so both move to the following Monday.
> *Actual:*
> ||Loan||Due dates||
> |Progressive|{*}15 Feb 2025 (Sat){*}, {*}15 Mar 2025 (Sat){*}, 15 Apr 2025|
> |Cumulative|17 Feb 2025, 17 Mar 2025, 15 Apr 2025|
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to