You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/10/02 23:25:27 UTC
svn commit: r1393192 - in /ofbiz/branches/release10.04: ./
applications/order/src/org/ofbiz/order/order/OrderServices.java
Author: jleroux
Date: Tue Oct 2 21:25:26 2012
New Revision: 1393192
URL: http://svn.apache.org/viewvc?rev=1393192&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/release10.04/ (props changed)
ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java
Propchange: ofbiz/branches/release10.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1392773
Modified: ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1393192&r1=1393191&r2=1393192&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/order/OrderServices.java Tue Oct 2 21:25:26 2012
@@ -3532,24 +3532,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