[OFBiz] SVN: r7803 - trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry

sichen@svn.ofbiz.org sichen at svn.ofbiz.org
Thu Jun 15 20:04:23 CDT 2006


Author: sichen
Date: 2006-06-15 20:04:20 -0500 (Thu, 15 Jun 2006)
New Revision: 7803

Modified:
   trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderstatus.bsh
Log:
Avoid problem if there is no shipment method associated with order during order entry

Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderstatus.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderstatus.bsh	2006-06-15 23:44:56 UTC (rev 7802)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderstatus.bsh	2006-06-16 01:04:20 UTC (rev 7803)
@@ -120,7 +120,11 @@
         context.put("carrierPartyId", shipGroup.getString("carrierPartyId"));
         context.put("shipmentMethodTypeId", shipGroup.getString("shipmentMethodTypeId"));
         shipmentMethodType = delegator.findByPrimaryKey("ShipmentMethodType", UtilMisc.toMap("shipmentMethodTypeId", shipGroup.getString("shipmentMethodTypeId")));
-        context.put("shipMethDescription", shipmentMethodType.getString("description"));
+        if (shipmentMethodType != null) {
+            context.put("shipMethDescription", shipmentMethodType.getString("description"));
+        } else {
+            context.put("shipMethDescription", "N/A");
+        }
         context.put("shippingInstructions", shipGroup.getString("shippingInstructions"));
         context.put("maySplit", shipGroup.getString("maySplit"));
         context.put("giftMessage", shipGroup.getString("giftMessage"));



More information about the Svn mailing list