You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacopo Cappellato <ti...@sastau.it> on 2007/05/17 17:44:22 UTC

Please review

What do you think about this patch?
I've replaced the three secas that call the "processOrderPayments" 
service from "appendOrderItem", "cancelOrderItem", "updateOrderItem" to 
the service "resetGrandTotal".

Is it correct to call the "processOrderPayments" service everytime the 
grand total is recomputed instead of just calling it when an order item 
is modified? (I guess it is)

Jacopo

Re: Please review

Posted by Jacopo Cappellato <ti...@sastau.it>.
And also, the following ecas is wrong, isn't it?

<eca service="updateReturnItem" event="commit">
     <condition field-name="statusId" operator="equals" 
value="RETURN_RECEIVED"/>
     <condition field-name="currentStatusId" operator="not-equals" 
value="RETURN_RECEIVED"/>
     <action service="resetGrandTotal" mode="sync"/>
</eca>

Can I remove it?

Jacopo

Jacopo Cappellato wrote:
> What do you think about this patch?
> I've replaced the three secas that call the "processOrderPayments" 
> service from "appendOrderItem", "cancelOrderItem", "updateOrderItem" to 
> the service "resetGrandTotal".
> 
> Is it correct to call the "processOrderPayments" service everytime the 
> grand total is recomputed instead of just calling it when an order item 
> is modified? (I guess it is)
> 
> Jacopo
> 
> 
> ------------------------------------------------------------------------
> 
> Index: applications/order/servicedef/secas.xml
> ===================================================================
> --- applications/order/servicedef/secas.xml	(revision 538906)
> +++ applications/order/servicedef/secas.xml	(working copy)
> @@ -97,15 +97,9 @@
>          <action service="resetGrandTotal" mode="sync"/>
>          <action service="sendOrderChangeNotification" mode="async" persist="true"/>
>      </eca>
> -    <eca service="updateOrderItems" event="return">
> -        <action service="processOrderPayments" mode="sync"/>
> -    </eca>
>      <eca service="appendOrderItem" event="commit">
>          <action service="resetGrandTotal" mode="sync"/>
>      </eca>
> -    <eca service="appendOrderItem" event="return">
> -        <action service="processOrderPayments" mode="sync"/>
> -    </eca>
>  
>      <!-- cancel order items -->
>      <eca service="cancelOrderItem" event="commit">
> @@ -113,10 +107,12 @@
>          <action service="resetGrandTotal" mode="sync"/>
>          <action service="sendOrderChangeNotification" mode="async" persist="true"/>
>      </eca>
> -    <eca service="cancelOrderItem" event="return">
> +
> +    <!-- order grand total -->
> +    <eca service="resetGrandTotal" event="return">
>          <action service="processOrderPayments" mode="sync"/>
>      </eca>
> -
> +    
>      <!-- order confirmation/notification email ECAs -->
>      <eca service="sendOrderConfirmation" event="commit">
>          <action service="createOrderNotificationLog" mode="sync"/>