Łukasz Wójcik created FINERACT-1569:
---------------------------------------

             Summary: Interests are excessively accrued for the whole period 
despite early full repayment
                 Key: FINERACT-1569
                 URL: https://issues.apache.org/jira/browse/FINERACT-1569
             Project: Apache Fineract
          Issue Type: Bug
          Components: Loan
    Affects Versions: 1.5.0
            Reporter: Łukasz Wójcik
         Attachments: image-2022-04-07-10-40-57-593.png, 
image-2022-04-07-10-45-16-566.png, image-2022-04-07-10-46-12-820.png, 
image-2022-04-07-10-47-43-640.png

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:
!image-2022-04-07-10-40-57-593.png!
and the loan:
!image-2022-04-07-10-45-16-566.png!
Prepay Loan returning 100.33 interests
!image-2022-04-07-10-46-12-820.png!
After repayment transaction (100.33 interests paid, but 13.91 more outstanding)
!image-2022-04-07-10-47-43-640.png!

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/27]and
 the loan: 
[https://openmf.github.io/community-app/?baseApiUrl=https%3A%2F%2Fdemo.fineract.dev&tenantIdentifier=default#/viewloanaccount/62]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to