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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to