Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1569

Interests are excessively accrued for the whole period despite early full repayment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.0
    • None
    • Loan
    • 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

      Attachments

        1. image-2022-04-07-10-47-43-640.png
          105 kB
          Łukasz Wójcik
        2. image-2022-04-07-10-46-12-820.png
          47 kB
          Łukasz Wójcik
        3. image-2022-04-07-10-45-16-566.png
          101 kB
          Łukasz Wójcik
        4. image-2022-04-07-10-40-57-593.png
          127 kB
          Łukasz Wójcik

        Activity

          People

            Unassigned Unassigned
            lukasz-w Łukasz Wójcik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: