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

Anil K Patel updated OFBIZ-2785:
--------------------------------

    Description: 
What is the issue - 
When user try to cancel a Paid invoice (associated payment is in CONFIRMED 
status) it throws an on attempt to removePaymentApplication. 
"removePaymentApplication" services enforces business rule that If Payment is 
in Confirmed status, PaymentApplications cannot be removed.

So to fix it I would suggest 
1) Remove above mentioned business rule from removePaymentApplication service.
2) Add status valid change for moving, Payment from CONFIRMED status to 
sent/received.
2) Remove Invoice Payment applications.

On completion of service Payment (Sent/Received status) will be available for 
applying to any other Invoice. 

All opinion and comments are much appreciated.


  was:
What is the issue - 
When user is try to cancel an invoice if its associated payment is in status 
CONFIRMED it throws an error. Reason is that, since service is try to remove 
associated payment applications and though Payment's status is CONFIRMED 
therefore it can't and result is an error.

So to fix it I would suggest that if Payment's status is Confirmed then update 
its status and set it to sent/received so that it allow to remove its 
applications.
I think it would be a feasible solution since by doing this payment will become 
in sent/received status and free to apply to any other invoice.

All opinion and comments are much appreciable.




> Invoice can be canceled when associated payment is in Confirmed status.
> -----------------------------------------------------------------------
>
>                 Key: OFBIZ-2785
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2785
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting
>    Affects Versions: SVN trunk
>            Reporter: Sumit Pandit
>            Priority: Minor
>             Fix For: SVN trunk
>
>
> What is the issue - 
> When user try to cancel a Paid invoice (associated payment is in CONFIRMED 
> status) it throws an on attempt to removePaymentApplication. 
> "removePaymentApplication" services enforces business rule that If Payment is 
> in Confirmed status, PaymentApplications cannot be removed.
> So to fix it I would suggest 
> 1) Remove above mentioned business rule from removePaymentApplication service.
> 2) Add status valid change for moving, Payment from CONFIRMED status to 
> sent/received.
> 2) Remove Invoice Payment applications.
> On completion of service Payment (Sent/Received status) will be available for 
> applying to any other Invoice. 
> All opinion and comments are much appreciated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to