Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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
- is a child of
-
FINERACT-1874 Release Apache Fineract 1.9.0
- In Progress
- links to