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

Undo last disbursal function deletes all disbursals on the last date

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.9.0
    • None

    Description

      When a loan have two (or more) disbursals on it, and we call the /loans/{loanId}?command=undolastdisbursal or /loans/external-id/{externalId}?command=undolastdisbursal API it will look for only the last DATE, not the last disbursal itself. So if the last two disbursal was on the same day, it will undo both of them.
      Also on UI the Undo Disburse and Disburse buttons are both visible, despite the disbursed amount is 0.

      Steps to reproduce

      • create loan
      • disburse partial amount with a given date
      • disburse rest of the amount with the same date
      • call /loans/{loanId}?command=undolastdisbursal or /loans/external-id/{externalId}?command=undolastdisbursal API

      Actual result

      • both disbursals will be undone, disbursed amount set back to 0

      Expected result

      • only the last disbursal should be undone - disbursement amount set back to the state after first disbursement

      Attachments

        Issue Links

          Activity

            People

              josealbertohm Jose Alberto Hernandez Maldonado
              mdallos Mihaly Dallos
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: