|
Author: jleroux
Date: Tue Oct 2 13:30:44 2012 New Revision: 1392909 URL: http://svn.apache.org/viewvc?rev=1392909&view=rev Log: "Applied fix from trunk for revision: 1392773" ------------------------------------------------------------------------ r1392773 | sascharodekamp | 2012-10-02 09:43:01 +0200 (mar., 02 oct. 2012) | 1 line Edit Estimated Ship Date or Estimated Delivery Date brings on date format error (https://issues.apache.org/jira/browse/OFBIZ-5045). A patch from Paul Foxworthy: The patch adds an if statement to ignore members of the isdm and iddm maps with keys that have a suffix of _i18n. ------------------------------------------------------------------------ Modified: ofbiz/branches/release12.04/ (props changed) ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/order/OrderServices.java Propchange: ofbiz/branches/release12.04/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1392773 Modified: ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1392909&r1=1392908&r2=1392909&view=diff ============================================================================== --- ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/order/OrderServices.java Tue Oct 2 13:30:44 2012 @@ -3720,24 +3720,31 @@ public class OrderServices { // Create Estimated Delivery dates for (Map.Entry<String, String> entry : itemEstimatedDeliveryDateMap.entrySet()) { String itemSeqId = entry.getKey(); - String estimatedDeliveryDate = entry.getValue(); - if (UtilValidate.isNotEmpty(estimatedDeliveryDate)) { - Timestamp deliveryDate = Timestamp.valueOf(estimatedDeliveryDate); - ShoppingCartItem cartItem = cart.findCartItem(itemSeqId); - cartItem.setDesiredDeliveryDate(deliveryDate); + + // ignore internationalised variant of dates + if (!itemSeqId.endsWith("_i18n")) { + String estimatedDeliveryDate = entry.getValue(); + if (UtilValidate.isNotEmpty(estimatedDeliveryDate)) { + Timestamp deliveryDate = Timestamp.valueOf(estimatedDeliveryDate); + ShoppingCartItem cartItem = cart.findCartItem(itemSeqId); + cartItem.setDesiredDeliveryDate(deliveryDate); + } } } // Create Estimated ship dates for (Map.Entry<String, String> entry : itemEstimatedShipDateMap.entrySet()) { String itemSeqId = entry.getKey(); - String estimatedShipDate = entry.getValue(); - if (UtilValidate.isNotEmpty(estimatedShipDate)) { - Timestamp shipDate = Timestamp.valueOf(estimatedShipDate); - ShoppingCartItem cartItem = cart.findCartItem(itemSeqId); - cartItem.setEstimatedShipDate(shipDate); - } + // ignore internationalised variant of dates + if (!itemSeqId.endsWith("_i18n")) { + String estimatedShipDate = entry.getValue(); + if (UtilValidate.isNotEmpty(estimatedShipDate)) { + Timestamp shipDate = Timestamp.valueOf(estimatedShipDate); + ShoppingCartItem cartItem = cart.findCartItem(itemSeqId); + cartItem.setEstimatedShipDate(shipDate); + } + } } // update the group amounts |
| Free forum by Nabble | Edit this page |
