Author: jleroux
Date: Sun Oct 23 18:09:28 2011 New Revision: 1187944 URL: http://svn.apache.org/viewvc?rev=1187944&view=rev Log: A patch from Leon "Minor update to order and cart service" https://issues.apache.org/jira/browse/OFBIZ-4485 The patch is related to following issues: 1. after append a new item to created or approved order, the externalId data of original items are lost 2. after append a new item to created or approved order, the itemDesiredDeliveryDate value is wronly set to shipBeforeDate field 3. make order item sequence id more compact and truely "sequential" Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1187944&r1=1187943&r2=1187944&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Sun Oct 23 18:09:28 2011 @@ -3641,7 +3641,7 @@ public class OrderServices { } // set the item in the selected ship group - item.setShipBeforeDate(itemDesiredDeliveryDate); + item.setDesiredDeliveryDate(itemDesiredDeliveryDate); cart.clearItemShipInfo(item); cart.setItemShipGroupQty(item, item.getQuantity(), shipGroupIdx); } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1187944&r1=1187943&r2=1187944&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sun Oct 23 18:09:28 2011 @@ -3531,17 +3531,17 @@ public class ShoppingCart implements Ite if (UtilValidate.isEmpty(item.getOrderItemSeqId())) { String orderItemSeqId = UtilFormatOut.formatPaddedNumber(nextItemSeq, 5); item.setOrderItemSeqId(orderItemSeqId); + nextItemSeq++; } else { try { int thisSeqId = Integer.parseInt(item.getOrderItemSeqId()); if (thisSeqId > nextItemSeq) { - nextItemSeq = thisSeqId; + nextItemSeq = thisSeqId + 1; } } catch (NumberFormatException e) { Debug.logError(e, module); } } - nextItemSeq++; // the initial status for all item types String initialStatus = "ITEM_CREATED"; Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1187944&r1=1187943&r2=1187944&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Sun Oct 23 18:09:28 2011 @@ -503,6 +503,7 @@ public class ShoppingCartServices { cartItem.setShoppingList(item.getString("shoppingListId"), item.getString("shoppingListItemSeqId")); cartItem.setIsModifiedPrice("Y".equals(item.getString("isModifiedPrice"))); cartItem.setName(item.getString("itemDescription")); + cartItem.setExternalId(item.getString("externalId")); // load order item attributes List<GenericValue> orderItemAttributesList = null; |
Free forum by Nabble | Edit this page |