You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Dhananjay Bhagat (Jira)" <ji...@apache.org> on 2026/09/26 08:33:00 UTC

[jira] [Commented] (FINERACT-2143) Dynamic loan product prepayment results mismatching Schedule and accounting

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

Dhananjay Bhagat commented on FINERACT-2143:
--------------------------------------------

[~mdallos], [~adamsaghy] 

I tried to reproduce this scenario by creating a loan product with these relevant configurations:
 * Principal: 654,000

 * 12 monthly repayments

 * Interest rate: 1.15% per period

 * Declining balance

 * Daily interest calculation

 * 360 days/year

 * Interest recalculation enabled

I then created and disbursed a loan on *1 Sept 2026* and made a 40,000 repayment on {*}20 Sept 2026{*}, i.e, between the scheduled installment dates of *1 Sept* and {*}1 Oct{*}.

I could not reproduce the schedule vs transaction mismatch shown in the images attached to this ticket by [Mihaly Dallos|https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mdallos]. The repayment is consistent in both the repayment schedule and the transaction data:
 * Repayment: 40,000

 * Interest paid/allocated: 7,521 (the ticket image shows 7352.33 due to different configurations)

 * Principal paid/allocated: 32,479

 * Principal outstanding after repayment: 621,521

For eg, the repayment transaction returned by the API contains the 40,000 repayment with 32,479 allocated to principal and 7,521 allocated to interest. The loan repayment schedule also reflects 32,479 principal paid and 7,521 interest paid for the period.

However this behavior does not appear to match the expected behavior described in the ticket as:
{quote}The payment is spent on the interest until payment date. The remaining spent on the balance and interest due is calculated for the rest of the days till next installment due.
{quote}
Here, the 7,521 interest amount in my reproduction corresponds to the full scheduled period from *1 Sept* to {*}1 Oct{*}. However, the expected behavior appears to be to first calculate interest from *1 Sept* up to the repayment date ({*}20 Sept{*}), apply the interest portion of the repayment, and use the remaining repayment amount to reduce the principal. The interest for the remaining period, from *20 Sept* to the next installment date ({*}1 Oct{*}), should then be recalculated based on the reduced principal.

My understanding of the expected calculation from the above description is:

1. Calculate interest only upto the repayment date.
2. Apply the accrued interest portion of the repayment.
3. Apply the remaining repayment amount to principal.
4. Recalculate interest for the remaining days until the next installment date using the reduced principal.

Can you confirm whether this is the intended behavior for this ticket?
I was able to reproduce the mid-installment repayment scenario described above, but I could not reproduce the schedule vs transaction mismatch shown in the attached images. If there are any additional conditions or configuraton differences relevant to the original mismatch, please let me know so I can investigate it further.

> Dynamic loan product prepayment results mismatching Schedule and accounting
> ---------------------------------------------------------------------------
>
>                 Key: FINERACT-2143
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2143
>             Project: Apache Fineract
>          Issue Type: Bug
>            Reporter: Mihaly Dallos
>            Priority: Major
>         Attachments: image-2024-10-18-10-06-00-062.png, image-2024-10-18-10-14-41-963.png, image-2024-10-18-10-19-50-306.png
>
>
> h4. *Steps to reproduce:* 
>  # Dusburse a loan of a dynamic loan product
>  # make a repayment in between two instalments
>  # compare the transaction and the schedule
> *Actual result:*
> The schedule shows that the paid amount reduces the principal, and interest is calculated accordingly which remains outstanding. The transaction amount is allocated differently though, it shows that the interest is paid and only the remaining amount is spent on the principal. 
> Schedule: 
> !image-2024-10-18-10-06-00-062.png!
> Transaction:
> !image-2024-10-18-10-14-41-963.png!
> h4. Expected result:
> The payment is spent on the interest until payment date. The remaining spent on the balance and interest due is calculated for the rest of the days till next installment due.
> !image-2024-10-18-10-19-50-306.png!



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