Author: apatel
Date: Tue Aug 14 17:11:22 2007
New Revision: 565985
URL:
http://svn.apache.org/viewvc?view=rev&rev=565985Log:
Now updateReturnHeader checks if the status change is valid.
Modified:
ofbiz/trunk/applications/order/config/OrderErrorUiLabels.properties
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
Modified: ofbiz/trunk/applications/order/config/OrderErrorUiLabels.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderErrorUiLabels.properties?view=diff&rev=565985&r1=565984&r2=565985==============================================================================
--- ofbiz/trunk/applications/order/config/OrderErrorUiLabels.properties (original)
+++ ofbiz/trunk/applications/order/config/OrderErrorUiLabels.properties Tue Aug 14 17:11:22 2007
@@ -100,6 +100,8 @@
OrderErrorCustRequestWithIdDoesntExist=Error : CustRequest with id [ ${custRequestId} ] doesn't exist.
OrderErrorGettingOrderHeaderInformationNull=Error getting order header information ; null
OrderErrorGettingReturnHeaderItemInformation=Error getting ReturnHeader/Item information
+OrderErrorReturnHeaderItemStatusNotChangedIsNotAValidChange=Return status not changed ${statusId} -> ${statusIdTo} is not a valid change.
+
OrderErrorInvalidOrderTypeWithID=ERROR : Invalid OrderType with ID : ${orderTypeId}
OrderErrorNoOrderItemsFound=ERROR : No order items found.
OrderErrorNoValidOrderHeaderFoundForOrderId=ERROR : No valid order header found for orderId : ${orderId}
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=565985&r1=565984&r2=565985==============================================================================
--- 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:11:22 2007
@@ -186,7 +186,14 @@
</else>
</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/>
<entity-and entity-name="ReturnAdjustment" list-name="returnAdjustments">
<field-map field-name="returnId" env-name="returnHeader.returnId"/>
</entity-and>