[OFBiz] SVN: r6894 - trunk/applications/order/script/org/ofbiz/order/order

sichen@svn.ofbiz.org sichen at svn.ofbiz.org
Thu Mar 2 13:53:16 CST 2006


Author: sichen
Date: 2006-03-02 13:53:13 -0600 (Thu, 02 Mar 2006)
New Revision: 6894

Modified:
   trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
Log:
Fixed problem with balance adjustment only being created when order total > return total.  Now will create a balance adjustment of any amount to round things out for quick refunded returns.  Should reduce rounding-related errors for quick-refunding returns

Modified: trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
===================================================================
--- trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml	2006-03-02 19:51:54 UTC (rev 6893)
+++ trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml	2006-03-02 19:53:13 UTC (rev 6894)
@@ -711,14 +711,14 @@
         <log level="info" message="OrderTotal [${orderTotal}] - ReturnTotal [${returnTotal}] = available Return Total [${availableReturnTotal}]"/>
 
         <!-- create a manual balance adjustment based on the difference between order total and return total -->        
-        <if-compare field-name="availableReturnTotal" operator="greater" value="0.01" type="Double">
-            <log level="info" message="availableReturnTotal amount is greater than zero"/>
+        <if-compare field-name="availableReturnTotal" operator="not-equals" value="0.00" type="Double">
             <string-to-field string="Balance Adjustment" field-name="description" map-name="balanceItemCtx"/>
             <string-to-field string="RET_MAN_ADJ" field-name="returnAdjustmentTypeId" map-name="balanceItemCtx"/>
 
             <field-to-field field-name="returnId" to-map-name="balanceItemCtx"/>
             <set field="balanceItemCtx.returnItemSeqId" value="_NA_"/>
             <set from-field="availableReturnTotal" field="balanceItemCtx.amount" />
+            <log level="info" message="Creating a balance adjustment of [${availableReturnTotal}] for return [${returnId}]"/>
 
             <!-- create the balance adjustment return item -->
             <call-service service-name="createReturnAdjustment" in-map-name="balanceItemCtx" include-user-login="true"/>



More information about the Svn mailing list