You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2012/10/02 09:43:01 UTC
svn commit: r1392773 -
/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
Author: sascharodekamp
Date: Tue Oct 2 07:43:01 2012
New Revision: 1392773
URL: http://svn.apache.org/viewvc?rev=1392773&view=rev
Log:
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/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.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=1392773&r1=1392772&r2=1392773&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 Tue Oct 2 07:43:01 2012
@@ -3730,24 +3730,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