svn commit: r463729 - /incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r463729 - /incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

sichen
Author: sichen
Date: Fri Oct 13 09:24:07 2006
New Revision: 463729

URL: http://svn.apache.org/viewvc?view=rev&rev=463729
Log:
Fixed problems with recalc shipping service where lack of a shipment estimate would cause an NPE or return a service error, making it impossible to cancel purchase order items

Modified:
    incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?view=diff&rev=463729&r1=463728&r2=463729
==============================================================================
--- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Fri Oct 13 09:24:07 2006
@@ -1437,10 +1437,11 @@
 
                 List errorMessageList = (List) shippingEstMap.get(ModelService.ERROR_MESSAGE_LIST);
                 if (errorMessageList != null) {
-                    return ServiceUtil.returnError(errorMessageList);
+                    Debug.logWarning("Problem finding shipping estimates for [" + orderId + "/ " + shipGroupSeqId + "] = " + errorMessageList, module);
+                    continue;
                 }
 
-                if (shippingTotal.doubleValue() != currentShipping) {
+                if ((shippingTotal != null) && (shippingTotal.doubleValue() != currentShipping)) {
                     // place the difference as a new shipping adjustment
                     Double adjustmentAmount = new Double(shippingTotal.doubleValue() - currentShipping);
                     String adjSeqId = delegator.getNextSeqId("OrderAdjustment").toString();