Author: apatel
Date: Tue Aug 14 17:25:30 2007
New Revision: 565987
URL:
http://svn.apache.org/viewvc?view=rev&rev=565987Log:
I think StatusValidChange check makes sense only if we are modifying statusId.
Modified:
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml?view=diff&rev=565987&r1=565986&r2=565987==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Tue Aug 14 17:25:30 2007
@@ -187,13 +187,15 @@
</if-not-empty>
</iterate>
<!-- Checking that the Status change is Valid or Not-->
- <set field="statusIdTo" from-field="parameters.statusId"/>
- <set field="statusId" from-field="returnHeader.statusId"/>
- <entity-one entity-name="StatusValidChange" value-name="statusValidChange"/>
- <if-empty field-name="statusValidChange">
- <add-error><fail-property resource="OrderErrorUiLabels" property="OrderErrorReturnHeaderItemStatusNotChangedIsNotAValidChange"/></add-error>
- </if-empty>
- <check-errors/>
+ <if-compare-field operator="not-equals" field-name="parameters.statusId" to-field-name="returnHeader.statusId">
+ <set field="statusIdTo" from-field="parameters.statusId"/>
+ <set field="statusId" from-field="returnHeader.statusId"/>
+ <entity-one entity-name="StatusValidChange" value-name="statusValidChange"/>
+ <if-empty field-name="statusValidChange">
+ <add-error><fail-property resource="OrderErrorUiLabels" property="OrderErrorReturnHeaderItemStatusNotChangedIsNotAValidChange"/></add-error>
+ </if-empty>
+ <check-errors/>
+ </if-compare-field>
<entity-and entity-name="ReturnAdjustment" list-name="returnAdjustments">
<field-map field-name="returnId" env-name="returnHeader.returnId"/>
</entity-and>