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

sichen@svn.ofbiz.org sichen at svn.ofbiz.org
Fri Apr 7 08:43:52 CDT 2006


Author: sichen
Date: 2006-04-07 08:43:50 -0500 (Fri, 07 Apr 2006)
New Revision: 7230

Modified:
   trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
Log:
Fixed bug in creating return items where sometimes the prices being the same causes an error.  Patch from Jacques Le Roux

Modified: trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
===================================================================
--- trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml	2006-04-07 13:33:49 UTC (rev 7229)
+++ trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml	2006-04-07 13:43:50 UTC (rev 7230)
@@ -291,10 +291,14 @@
             <if-compare-field field-name="returnPriceDelta" operator="less" to-field-name="zero" type="Double">
                 <calculate field-name="returnPriceDelta" type="Double"><calcop field-name="returnPriceDelta" operator="negative"/></calculate>
             </if-compare-field>
+			
+			<!-- just checking greater-equals sometimes returns an error if the difference is actually zero -->
+            <if-compare-field field-name="returnPriceDelta" operator="not-equals" to-field-name="zero" type="Double">
+				<if-compare-field field-name="returnPriceDelta" operator="greater-equals" to-field-name="epsilon" type="Double">
+					<add-error><fail-property resource="OrderErrorUiLabels" property="OrderReturnPriceCannotExceedThePurchasePrice"/></add-error>
+				</if-compare-field >
+            </if-compare-field>
 
-            <if-compare-field field-name="returnPriceDelta" operator="greater-equals" to-field-name="epsilon" type="Double">
-                <add-error><fail-property resource="OrderErrorUiLabels" property="OrderReturnPriceCannotExceedThePurchasePrice"/></add-error>
-            </if-compare-field>
             <check-errors/>
 
             <else>



More information about the Svn mailing list