Author: apatel
Date: Tue Aug 14 17:32:45 2007
New Revision: 565988
URL:
http://svn.apache.org/viewvc?view=rev&rev=565988Log:
check StatusValidChange only if statusId is coming in Parameter
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=565988&r1=565987&r2=565988==============================================================================
--- 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:32:45 2007
@@ -187,15 +187,23 @@
</if-not-empty>
</iterate>
<!-- Checking that the Status change is Valid or Not-->
- <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>
+ <if>
+ <condition>
+ <and>
+ <not><if-empty field-name="parameters.statusId"></if-empty></not>
+ <if-compare-field operator="not-equals" field-name="parameters.statusId" to-field-name="returnHeader.statusId"/>
+ </and>
+ </condition>
+ <then>
+ <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/>
+ </then>
+ </if>
<entity-and entity-name="ReturnAdjustment" list-name="returnAdjustments">
<field-map field-name="returnId" env-name="returnHeader.returnId"/>
</entity-and>