Author: mor
Date: Thu Apr 9 09:56:56 2009
New Revision: 763582
URL:
http://svn.apache.org/viewvc?rev=763582&view=revLog:
Fix the padding on returnItemSeqId field when a return is created.
Applied a slightly modified patch from OFBIZ-2281 (
https://issues.apache.org/jira/browse/OFBIZ-2281).
Thanks Divesh Dutta for the contribution.
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?rev=763582&r1=763581&r2=763582&view=diff==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Thu Apr 9 09:56:56 2009
@@ -368,15 +368,13 @@
<string-to-list string="-returnItemSeqId" list="orderBy"/>
<find-by-and entity-name="ReturnItem" list="currentItems" map="lookupMap" order-by-list="orderBy"></find-by-and>
<if-empty field="currentItems">
- <set value="1" field="newEntity.returnItemSeqId"/>
+ <set field="newEntity.returnItemSeqId" value="1"/>
<else>
<first-from-list entry="newestItem" list="currentItems"/>
- <set field="newestItem.returnItemSeqId" value="${newestItem.returnItemSeqId + 1}" type="Integer"/>
+ <set field="newEntity.returnItemSeqId" value="${newestItem.returnItemSeqId + 1}" type="Integer"/>
</else>
</if-empty>
- <to-string field="newestItem.returnItemSeqId" numeric-padding="5"/>
- <set field="newEntity.returnItemSeqId" from-field="newestItem.returnItemSeqId" type="PlainString"/>
-
+ <to-string field="newEntity.returnItemSeqId" numeric-padding="5"/>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
<set field="newEntity.statusId" value="RETURN_REQUESTED"/> <!-- default status for new return items -->
<field-to-result field="newEntity.returnItemSeqId" result-name="returnItemSeqId"/>