You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "AshharAhmadKhan (via GitHub)" <gi...@apache.org> on 2026/06/13 14:52:09 UTC
[PR] FINERACT-2589: Fix repayment template to return next unpaid installment amount [fineract]
AshharAhmadKhan opened a new pull request, #5985:
URL: https://github.com/apache/fineract/pull/5985
Fixes [FINERACT-2589](https://issues.apache.org/jira/browse/FINERACT-2589)
## Description
When a loan has been partially repaid, the repayment transaction template was always returning the amount of the first installment by sequence number, even if that installment was already fully paid. This caused the suggested repayment amount to show as zero for borrowers whose earliest installment had been satisfied.
The fix extracts the due amount expressions for principal, interest, fees, and penalties into named variables, then uses them in the ORDER BY clause to prioritize installments with any outstanding balance. Fully paid installments are pushed to the end, while the secondary sort by installment number is preserved to maintain correct ordering within each group.
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2589: Fix repayment template to return next unpaid installment amount [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #5985:
URL: https://github.com/apache/fineract/pull/5985
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2589: Fix repayment template to return next unpaid installment amount [fineract]
Posted by "AshharAhmadKhan (via GitHub)" <gi...@apache.org>.
AshharAhmadKhan commented on PR #5985:
URL: https://github.com/apache/fineract/pull/5985#issuecomment-4715052020
@adamsaghy i have reviewed the PR. Let me know if you would like any changes.
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2589: Fix repayment template to return next unpaid installment amount [fineract]
Posted by "AshharAhmadKhan (via GitHub)" <gi...@apache.org>.
AshharAhmadKhan commented on PR #5985:
URL: https://github.com/apache/fineract/pull/5985#issuecomment-4716943918
@adamsaghy Integration test added in repaymentTemplateReturnsNextUnpaidInstallmentAmount() verifying the template returns the next unpaid installment after a partial repayment.
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2589: Fix repayment template to return next unpaid installment amount [fineract]
Posted by "AshharAhmadKhan (via GitHub)" <gi...@apache.org>.
AshharAhmadKhan commented on PR #5985:
URL: https://github.com/apache/fineract/pull/5985#issuecomment-4700705140
@adamsaghy failure unrelated to my code. Please retrigger check when you get a chance.
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org