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

Final Income Accruals for Loan can't be applied when multiple fee charges exist on instalments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.10.0
    • None
    • Loan
    • None
    • Patch, Important

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sbroughton Steve Broughton
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified