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

Adam Saghy reassigned FINERACT-2899:
------------------------------------

    Assignee: Piotr Wargulak

> Undoing a WAIVE_CHARGES transaction through transaction adjustment reverses 
> it but leaves the charge waived
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-2899
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2899
>             Project: Apache Fineract
>          Issue Type: Bug
>          Components: Charges
>    Affects Versions: 1.15.0
>            Reporter: Piotr Wargulak
>            Assignee: Piotr Wargulak
>            Priority: Major
>             Fix For: 1.16.0
>
>
> {{POST /loans/\{loanId}/transactions/\{transactionId}?command=undo}} is 
> accepted for a {{WAIVE_CHARGES}} transaction and returns 200. 
> The transaction is marked reversed, but the charge stays waived.
> The loan is left inconsistent with no error reported, and it cannot be 
> repaired afterwards: undo-waive refuses the waiver as already reversed.
> *Steps to reproduce:*
>  # Create a loan with a fee and waive the fee.
>  # Undo the waiver with {{{}POST 
> /loans/\{loanId}/transactions/\{transactionId}?command=undo{}}}.
>  # Observe that the transaction is reversed while the charge is still waived.
> *Proposed fix:* reject adjust/undo of {{WAIVE_CHARGES}} transactions, as is 
> already done for interest refunds, with a validation error that points to 
> undo-waive ({{{}PUT /loans/\{loanId}/transactions/\{transactionId}{}}}), 
> which restores the charge correctly. This prevents users from corrupting 
> loans through the generic endpoint. Add a test for the rejection.



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

Reply via email to