svn commit: r1560049 - in /ofbiz/branches/release13.07: ./ 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: r1560049 - in /ofbiz/branches/release13.07: ./ applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy

adrianc
Author: adrianc
Date: Tue Jan 21 15:59:50 2014
New Revision: 1560049

URL: http://svn.apache.org/r1560049
Log:
Merged revision(s) 1560048 from ofbiz/trunk:
Order view NPE bug fix. Don't assume a product store has a related facility.

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

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1554290,1560048

Modified: ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=1560049&r1=1560048&r2=1560049&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original)
+++ ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Tue Jan 21 15:59:50 2014
@@ -273,10 +273,12 @@ if (orderHeader) {
     context.productStore = productStore;
     if (productStore) {
         facility = productStore.getRelatedOne("Facility", false);
-        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.