Author: ashish
Date: Fri Mar 20 13:28:42 2009
New Revision: 756449
URL:
http://svn.apache.org/viewvc?rev=756449&view=revLog:
Applied patch from OFBIZ-2246 (estimatedShipDate and estimatedDeliveryDate are not getting updated while editing order items for Purchase order)
Thanks Mr. Divesh Dutta for your patch and special thanks to Mr. Pranay Pandey for reporting this bug.
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=756449&r1=756448&r2=756449&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 Fri Mar 20 13:28:42 2009
@@ -3503,21 +3503,21 @@
for (Map.Entry<String, String> entry : itemEstimatedDeliveryDateMap.entrySet()) {
String itemSeqId = entry.getKey();
String estimatedDeliveryDate = entry.getValue();
- Timestamp shipDate = Timestamp.valueOf(estimatedDeliveryDate);
- if (estimatedDeliveryDate != null) {
+ if (UtilValidate.isNotEmpty(estimatedDeliveryDate)) {
+ Timestamp deliveryDate = Timestamp.valueOf(estimatedDeliveryDate);
ShoppingCartItem cartItem = cart.findCartItem(itemSeqId);
- cartItem.setDesiredDeliveryDate(shipDate);
+ cartItem.setDesiredDeliveryDate(deliveryDate);
}
}
// Create Estimated ship dates
for (Map.Entry<String, String> entry : itemEstimatedShipDateMap.entrySet()) {
String itemSeqId = entry.getKey();
- String estimatedShipDate = entry.getValue();
- Timestamp deliveryDate = Timestamp.valueOf(estimatedShipDate);
- if (estimatedShipDate != null) {
+ String estimatedShipDate = entry.getValue();
+ if (UtilValidate.isNotEmpty(estimatedShipDate)) {
+ Timestamp shipDate = Timestamp.valueOf(estimatedShipDate);
ShoppingCartItem cartItem = cart.findCartItem(itemSeqId);
- cartItem.setEstimatedShipDate(deliveryDate);
+ cartItem.setEstimatedShipDate(shipDate);
}
}