svn commit: r430082 - /incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r430082 - /incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml

sichen
Author: sichen
Date: Wed Aug  9 09:12:18 2006
New Revision: 430082

URL: http://svn.apache.org/viewvc?rev=430082&view=rev
Log:
Fixed bug where required OUT parameter wasn't being set in service getOrderedSummaryInformation.

Modified:
    incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml

Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=430082&r1=430081&r2=430082&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original)
+++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Wed Aug  9 09:12:18 2006
@@ -68,21 +68,21 @@
             <select-field field-name="totalSubRemainingAmount"/>
             <select-field field-name="totalOrders"/>
         </entity-condition>
-        
+
+        <!-- first set the required OUT fields to zero -->
+        <calculate field-name="plainDoubleZero" type="Double"><number value="0.0"/></calculate>
+        <calculate field-name="plainLongZero" type="Long"><number value="0"/></calculate>
+        <field-to-result field-name="plainDoubleZero" result-name="totalGrandAmount"/>
+        <field-to-result field-name="plainDoubleZero" result-name="totalSubRemainingAmount"/>
+        <field-to-result field-name="plainLongZero" result-name="totalOrders"/>
+
         <!-- because we specified the partyId and the roleTypeId, should only be one item in list returned -->
         <first-from-list list-name="orderInfoList" entry-name="orderInfo"/>
-        <if-empty field-name="orderInfo">
-            <calculate field-name="plainDoubleZero" type="Double"><number value="0.0"/></calculate>
-            <calculate field-name="plainLongZero" type="Long"><number value="0"/></calculate>
-            <field-to-result field-name="plainDoubleZero" result-name="totalGrandAmount"/>
-            <field-to-result field-name="plainDoubleZero" result-name="totalSubRemainingAmount"/>
-            <field-to-result field-name="plainLongZero" result-name="totalOrders"/>
-        <else>
+        <if-not-empty field-name="orderInfo">
             <field-to-result field-name="orderInfo.totalGrandAmount" result-name="totalGrandAmount"/>
             <field-to-result field-name="orderInfo.totalSubRemainingAmount" result-name="totalSubRemainingAmount"/>
             <field-to-result field-name="orderInfo.totalOrders" result-name="totalOrders"/>
-        </else>
-        </if-empty>
+        </if-not-empty>
     </simple-method>
     <simple-method method-name="createOrderShipment" short-description="Create OrderShipment">
         <set value="Create OrderShipment" field="operationName"/>