Author: jacopoc
Date: Tue May 8 07:37:20 2007
New Revision: 536205
URL:
http://svn.apache.org/viewvc?view=rev&rev=536205Log:
Added check to verify that the payment method is set when return items of type repair are added to an approved return.
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=536205&r1=536204&r2=536205==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Tue May 8 07:37:20 2007
@@ -233,6 +233,23 @@
<check-errors/>
</if-empty>
+ <if>
+ <condition>
+ <and>
+ <if-empty field-name="returnHeader.paymentMethodId"/>
+ <if-compare field-name="returnHeader.statusId" operator="equals" value="RETURN_ACCEPTED"/>
+ <or>
+ <if-compare field-name="parameters.returnTypeId" operator="equals" value="RTN_CSREPLACE"/>
+ <if-compare field-name="parameters.returnTypeId" operator="equals" value="RTN_REPAIR_REPLACE"/>
+ </or>
+ </and>
+ </condition>
+ <then>
+ <add-error><fail-property resource="OrderErrorUiLabels" property="OrderReturnPaymentMethodNeededForThisTypeOfReturn"/></add-error>
+ </then>
+ </if>
+ <check-errors/>
+
<if-compare field-name="returnQuantity" map-name="parameters" operator="equals" value="0" type="Double">
<add-error><fail-property resource="OrderErrorUiLabels" property="OrderNoReturnQuantityAvailablePreviousReturnsMayExist"/></add-error>
<check-errors/>