Author: jacopoc
Date: Mon Dec 11 07:13:28 2006
New Revision: 485697

URL: http://svn.apache.org/viewvc?view=rev&rev=485697
Log:
The id of order items for replacements orders are now padded to 5 digits (as 
already happens for standard orders).

Modified:
    
incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java

Modified: 
incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?view=diff&rev=485697&r1=485696&r2=485697
==============================================================================
--- 
incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
 (original)
+++ 
incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
 Mon Dec 11 07:13:28 2006
@@ -34,6 +34,7 @@
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralRuntimeException;
 import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilFormatOut;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilNumber;
 import org.ofbiz.base.util.UtilProperties;
@@ -1333,7 +1334,7 @@
                             Double unitPrice = 
returnItem.getDouble("returnPrice");
                             if (quantity != null && unitPrice != null) {
                                 itemTotal = (quantity.doubleValue() * 
unitPrice.doubleValue());
-                                GenericValue newItem = 
delegator.makeValue("OrderItem", UtilMisc.toMap("orderItemSeqId", 
Integer.toString(itemCount)));
+                                GenericValue newItem = 
delegator.makeValue("OrderItem", UtilMisc.toMap("orderItemSeqId", 
UtilFormatOut.formatPaddedNumber(itemCount, 5)));
 
                                 newItem.set("orderItemTypeId", 
orderItem.get("orderItemTypeId"));
                                 newItem.set("productId", 
orderItem.get("productId"));


Reply via email to