Steve Broughton created FINERACT-2124:
-----------------------------------------
Summary: Final Income Accruals for Loan can't be applied when
multiple fee charges exist on instalments
Key: FINERACT-2124
URL: https://issues.apache.org/jira/browse/FINERACT-2124
Project: Apache Fineract
Issue Type: Bug
Components: Loan
Affects Versions: 1.10.0
Reporter: Steve Broughton
Attachments:
Fix_fineract_bug_which_incorrectly_calculates_total_fee_amount_.patch
When applying the final income accruals on a loan that has been fully repaid in
advance, if there are more than a single fee charge on an instalment, an error
is thrown.
"Meltdown in advanced accounting...sum of all charges is not equal to the fee
charge for a transaction",
This is quite a serious bug as it prevents a loan from being closed. It occurs
when the final amount payable is repaid
The cause of this is an incorrect calculation of the amount already accrued for
charges in LoanAccountDomainServiceJpa.applyFinalIncomeAccrualTransaction.
When calculating the amount accrued for a charge, the amount of the
LoanTransaction associated with the charge is summed, rather than the amount of
the LoanChargePaidBy. This produces in an incorrect calculation which results
in the "Meltdown in advanced accounting" exception being shown.
The correct calculation is to sum the amount of the LoanChargePaidBy rather
than summing the amount of the LoanTransaction associated with the
LoanChargePaidBy.
Very simple fix - patch attached
Steps to reproduce
Create a loan
Add multiple instalment charges
Accrue the loan for a few months
Prepay the loan for the full amount remaining.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)