You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/01/21 19:31:51 UTC

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

Author: jleroux
Date: Tue Jan 21 18:31:51 2014
New Revision: 1560128

URL: http://svn.apache.org/r1560128
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/release11.04/   (props changed)
    ofbiz/branches/release11.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy

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

Modified: ofbiz/branches/release11.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=1560128&r1=1560127&r2=1560128&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original)
+++ ofbiz/branches/release11.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Tue Jan 21 18:31:51 2014
@@ -273,10 +273,12 @@ if (orderHeader) {
     productStore = orderHeader.getRelatedOne("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.