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

Vikas Mayur updated OFBIZ-5854:
-------------------------------
    Description: 
If you put an approved order on hold and then later cancel an item on the 
order, the order is auto approved. Order must have two line items to test the 
behavior. The expected result is that order should stay on hold.

In this chain of events, following eca is triggered. The service 
'checkOrderItemStatus' should be fixed such that it also check the current 
order header status before it approve the order.


{code}
    <eca service="changeOrderItemStatus" event="commit">
        <condition field-name="statusId" operator="equals" 
value="ITEM_CANCELLED"/>
        <action service="cancelOrderInventoryReservation" mode="sync"/>
        <action service="recalcTaxTotal" mode="sync"/>
        <action service="resetGrandTotal" mode="sync"/>
        <action service="checkOrderItemStatus" mode="sync"/>
    </eca>
{code}

  was:
If you put an approved order on hold and then later cancel an item on the 
order, the order is auto approved. Order must have two line items to test the 
behavior. The expected result is that order should stay on hold.

In this chain of events, following eca is triggered. The service 
'checkOrderItemStatus' should be fixed such that it also check the current 
order header status before cancel/approve/complete the order.


{code}
    <eca service="changeOrderItemStatus" event="commit">
        <condition field-name="statusId" operator="equals" 
value="ITEM_CANCELLED"/>
        <action service="cancelOrderInventoryReservation" mode="sync"/>
        <action service="recalcTaxTotal" mode="sync"/>
        <action service="resetGrandTotal" mode="sync"/>
        <action service="checkOrderItemStatus" mode="sync"/>
    </eca>
{code}


> Order On Hold Auto Approves When Edited
> ---------------------------------------
>
>                 Key: OFBIZ-5854
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5854
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: Trunk
>            Reporter: Vikas Mayur
>            Priority: Minor
>             Fix For: Upcoming Branch, 12.04.06, 13.07.02
>
>         Attachments: order.patch
>
>
> If you put an approved order on hold and then later cancel an item on the 
> order, the order is auto approved. Order must have two line items to test the 
> behavior. The expected result is that order should stay on hold.
> In this chain of events, following eca is triggered. The service 
> 'checkOrderItemStatus' should be fixed such that it also check the current 
> order header status before it approve the order.
> {code}
>     <eca service="changeOrderItemStatus" event="commit">
>         <condition field-name="statusId" operator="equals" 
> value="ITEM_CANCELLED"/>
>         <action service="cancelOrderInventoryReservation" mode="sync"/>
>         <action service="recalcTaxTotal" mode="sync"/>
>         <action service="resetGrandTotal" mode="sync"/>
>         <action service="checkOrderItemStatus" mode="sync"/>
>     </eca>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to