svn commit: r1560127 - in /ofbiz/branches/release12.04: ./ applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy

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

svn commit: r1560127 - in /ofbiz/branches/release12.04: ./ applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy

jleroux@apache.org
Author: jleroux
Date: Tue Jan 21 18:31:49 2014
New Revision: 1560127

URL: http://svn.apache.org/r1560127
Log:
"Applied fix from trunk for revision: 1560048"
------------------------------------------------------------------------
r1560048 | adrianc | 2014-01-21 16:57:30 +0100 (mar. 21 janv. 2014) | 2 lignes

Order view NPE bug fix. Don't assume a product store has a related facility.

------------------------------------------------------------------------


Modified:
    ofbiz/branches/release12.04/   (props changed)
    ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1560048

Modified: ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=1560127&r1=1560126&r2=1560127&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original)
+++ ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Tue Jan 21 18:31:49 2014
@@ -273,10 +273,12 @@ if (orderHeader) {
     context.productStore = productStore;
     if (productStore) {
         facility = productStore.getRelatedOne("Facility");
-        inventorySummaryByFacility = dispatcher.runSync("getProductInventorySummaryForItems", [orderItems : orderItems, facilityId : facility.facilityId]);
-        context.availableToPromiseByFacilityMap = inventorySummaryByFacility.availableToPromiseMap;
-        context.quantityOnHandByFacilityMap = inventorySummaryByFacility.quantityOnHandMap;
-        context.facility = facility;
+        if (facility) {
+            inventorySummaryByFacility = dispatcher.runSync("getProductInventorySummaryForItems", [orderItems : orderItems, facilityId : facility.facilityId]);
+            context.availableToPromiseByFacilityMap = inventorySummaryByFacility.availableToPromiseMap;
+            context.quantityOnHandByFacilityMap = inventorySummaryByFacility.quantityOnHandMap;
+            context.facility = facility;
+        }
     }
 
     // Get a list of facilities for purchase orders to receive against.