[
https://issues.apache.org/jira/browse/FINERACT-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sonigra Bhavya Hemendrabhai updated FINERACT-2993:
--------------------------------------------------
Fix Version/s: 1.16.0
> RBI loan repayment schedule mapping leaks fee and penalty charges across
> installments
> -------------------------------------------------------------------------------------
>
> Key: FINERACT-2993
> URL: https://issues.apache.org/jira/browse/FINERACT-2993
> Project: Apache Fineract
> Issue Type: Bug
> Components: Loan
> Affects Versions: 1.16.0
> Reporter: Sonigra Bhavya Hemendrabhai
> Assignee: Sonigra Bhavya Hemendrabhai
> Priority: Major
> Fix For: 1.16.0
>
> Attachments: Screenshot 2026-10-25 at 9.24.37 PM.png
>
>
> Bug Description:
> In RBILoanRepaymentScheduleTransactionProcessor.java, when creating repayment
> schedule mappings for subsequent installments in the second loop (handling
> late repayments), the outer-scoped feeChargesPortion and
> penaltyChargesPortion from the overdue installment are reused instead of
> being zeroed out.
> Impact:
> 1. Fee and penalty charges from previous installments are falsely duplicated
> and mapped to subsequent installments that never had those charges.
> 2. The sum of the mapping amounts in
> m_loan_transaction_repayment_schedule_mapping exceeds the actual payment
> amount of the parent transaction (e.g. $650.00 mapped on a $600.00 payment).
> 3. Corrupts reverse-replay and accounting during chargebacks.
> Steps to Reproduce:
> 1. Create a loan with "rbi-india-strategy".
> 2. Add a $50.00 penalty charge due on Installment 1.
> 3. Make a late repayment of $600.00 (covering Installment 1 of $565.00 and
> $35.00 toward Installment 2).
> 4. Query m_loan_transaction_repayment_schedule_mapping.
> Result: Installment 2 mapping falsely receives
> penalty_charges_portion_derived = 50.00, and total mapping amount is $650.00.
> Fix:
> Ensure fee and penalty portions are zeroed out (Money.zero(currency)) for
> subsequent installment mappings and only add mapping when principalPortion is
> greater than zero. !Screenshot 2026-10-25 at 9.24.37 PM.png!
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)