Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.5.0
-
None
-
None
Description
Given: daily interest loan with compounding on interests
And: repayment strategy set to Principal, Interest, Penalties, Fees
And: prepay loan returning X for today
When: repayment of X is made
Then: some interests are still outstanding
And: loan is not closed
What happens under the hood is that AbstractLoanScheduleGenerator.generate() recalculates interests for the whole loan term. For days after the transaction date the principal becomes 0, but compounding on interests results in producing some small amounts for each day.
`prepayLoan` calculates the interests only for period <loanStartDate, transactionDate>. It also seems to be working fine if the repayment strategy is `interestFirst`.
Please find the product configuration:
and the loan:
Prepay Loan returning 100.33 interests
After repayment transaction (100.33 interests paid, but 13.91 more outstanding)
We're using the `1.5.0` version, but I'va managed to reproduce this issue on fineract.dev. Here's the loan product: https://openmf.github.io/community-app/?baseApiUrl=https%3A%2F%2Fdemo.fineract.dev&tenantIdentifier=default#/viewloanproduct/27and the loan: https://openmf.github.io/community-app/?baseApiUrl=https%3A%2F%2Fdemo.fineract.dev&tenantIdentifier=default#/viewloanaccount/62