Author: sichen
Date: Thu Oct 12 16:50:36 2006 New Revision: 463518 URL: http://svn.apache.org/viewvc?view=rev&rev=463518 Log: Fix bug where changing order adjustments was not changing order total Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml incubator/ofbiz/trunk/applications/order/servicedef/services.xml Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml?view=diff&rev=463518&r1=463517&r2=463518 ============================================================================== --- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml (original) +++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml Thu Oct 12 16:50:36 2006 @@ -38,12 +38,20 @@ <entity-one entity-name="OrderAdjustment" value-name="lookedUpValue"/> <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/> <store-value value-name="lookedUpValue"/> + + <!-- now reset the order grand total --> + <set from-field="lookedUpValue.orderId" field="params.orderId"/> + <call-service service-name="resetGrandTotal" in-map-name="params"/> </simple-method> <simple-method method-name="deleteOrderAdjustment" short-description="Delete an OrderAdjustment"> <check-permission permission="ORDERMGR" action="_DELETE"><fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunDeleteOrderAdjustement"/></check-permission> <check-errors/> <entity-one entity-name="OrderAdjustment" value-name="lookedUpValue"/> <remove-value value-name="lookedUpValue"/> + + <!-- now reset the order grand total --> + <set from-field="lookedUpValue.orderId" field="params.orderId"/> + <call-service service-name="resetGrandTotal" in-map-name="params"/> </simple-method> <simple-method method-name="createOrderItemBilling" short-description="Create an OrderItemBilling"> Modified: incubator/ofbiz/trunk/applications/order/servicedef/services.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/servicedef/services.xml?view=diff&rev=463518&r1=463517&r2=463518 ============================================================================== --- incubator/ofbiz/trunk/applications/order/servicedef/services.xml (original) +++ incubator/ofbiz/trunk/applications/order/servicedef/services.xml Thu Oct 12 16:50:36 2006 @@ -161,14 +161,14 @@ </service> <service name="updateOrderAdjustment" default-entity-name="OrderAdjustment" engine="simple" location="org/ofbiz/order/order/OrderSimpleMethods.xml" invoke="updateOrderAdjustment"> - <description>Update an order adjustment record</description> + <description>Update an order adjustment record and reset the order grand total</description> <auto-attributes mode="IN" include="pk" optional="false"/> <auto-attributes mode="IN" include="nonpk" optional="true"/> <override name="orderId" optional="false"/> </service> <service name="deleteOrderAdjustment" default-entity-name="OrderAdjustment" engine="simple" location="org/ofbiz/order/order/OrderSimpleMethods.xml" invoke="deleteOrderAdjustment"> - <description>Delete an order adjustment record</description> + <description>Delete an order adjustment record and reset the order grand total</description> <auto-attributes mode="IN" include="pk" optional="false"/> </service> |
Free forum by Nabble | Edit this page |