[ 
https://issues.apache.org/jira/browse/FINERACT-1854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mihaly Dallos updated FINERACT-1854:
------------------------------------
    Description: 
{panel}
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.
{panel}
*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


  was:
{panel}
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.
{panel}
*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

 * or try Undo last disbursal on UI

*Actual result*
 * both disbursals will be undone, disbursed amount set back to 0

 * on UI {{Undo last disbursal}} button is not visible, expected behaviour

 * on UI {{{}Undo disbursa{}}}l button is visible, functional - after one use 
it will disappear

 * on UI {{Disburse}} button is visible, functional - will suggest the whole 
amount for disbursal

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

 * on UI {{Undo last disbursal}} button is not visible, expected behaviour

 * on UI {{Undo disbursal }}button is visible, functional, but it works for 
only the ramaining disbursal

 * if undo last disbursal is done twice (can be done only from API), {{Undo 
disbursal}} button is NOT visible on UI

 * on UI {{Disburse}} button is visible, functional - will suggest the 
remaining amount for disbursal

 


> Undo last disbursal function deletes all disbursals on the last date
> --------------------------------------------------------------------
>
>                 Key: FINERACT-1854
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1854
>             Project: Apache Fineract
>          Issue Type: Bug
>            Reporter: Mihaly Dallos
>            Assignee: Jose Alberto Hernandez Maldonado
>            Priority: Major
>              Labels: PepperSoup
>
> {panel}
> 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.
> {panel}
> *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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to