Author: erwan
Date: Mon Oct 24 20:12:14 2011
New Revision: 1188349

URL: http://svn.apache.org/viewvc?rev=1188349&view=rev
Log:
A patch from Olivier Heintz - OFBIZ-4505 - Order history screen display an 
error when a new ShipmentPlan have been created with no shipment method, even 
if it's corrected after

Modified:
    
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy

Modified: 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy?rev=1188349&r1=1188348&r2=1188349&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy
 (original)
+++ 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy
 Mon Oct 24 20:12:14 2011
@@ -44,12 +44,14 @@ if (orderHeader) {
         orderShipmentHistory = [:];
         if 
("shipmentMethodTypeId".equals(shipmentMethodHistory.changedFieldName)) {
             shipmentMethodType = delegator.findOne("ShipmentMethodType", 
["shipmentMethodTypeId" : shipmentMethodHistory.newValueText], false);
-            carrierPartyHistories.each { carrierPartyHistory ->
-                if (carrierPartyHistory.lastUpdatedTxStamp == 
shipmentMethodHistory.lastUpdatedTxStamp) {
-                    if ("_NA_".equals(carrierPartyHistory.newValueText)) {
-                        orderShipmentHistory.shipmentMethod = 
shipmentMethodType.description;
-                    } else {
-                        orderShipmentHistory.shipmentMethod = 
carrierPartyHistory.newValueText + " " + shipmentMethodType.description;
+            if (shipmentMethodType != null){
+                carrierPartyHistories.each { carrierPartyHistory ->
+                    if (carrierPartyHistory.lastUpdatedTxStamp == 
shipmentMethodHistory.lastUpdatedTxStamp) {
+                        if ("_NA_".equals(carrierPartyHistory.newValueText)) {
+                            orderShipmentHistory.shipmentMethod = 
shipmentMethodType.description;
+                        } else {
+                            orderShipmentHistory.shipmentMethod = 
carrierPartyHistory.newValueText + " " + shipmentMethodType.description;
+                        }
                     }
                 }
             }


Reply via email to