svn commit: r1638074 - /ofbiz/trunk/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: r1638074 - /ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy

jacopoc
Author: jacopoc
Date: Tue Nov 11 12:51:53 2014
New Revision: 1638074

URL: http://svn.apache.org/r1638074
Log:
Converted the OrderView.groovy script to use the runService DSL method instead of the dispatcher.

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

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=1638074&r1=1638073&r2=1638074&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Tue Nov 11 12:51:53 2014
@@ -324,7 +324,7 @@ if (orderHeader) {
     }
 
     // get inventory summary for each shopping cart product item
-    inventorySummary = dispatcher.runSync("getProductInventorySummaryForItems", [orderItems : orderItems]);
+    inventorySummary = runService('getProductInventorySummaryForItems', [orderItems : orderItems])
     context.availableToPromiseMap = inventorySummary.availableToPromiseMap;
     context.quantityOnHandMap = inventorySummary.quantityOnHandMap;
     context.mktgPkgATPMap = inventorySummary.mktgPkgATPMap;
@@ -336,7 +336,7 @@ if (orderHeader) {
     if (productStore) {
         facility = productStore.getRelatedOne("Facility", false);
         if (facility) {
-            inventorySummaryByFacility = dispatcher.runSync("getProductInventorySummaryForItems", [orderItems : orderItems, facilityId : facility.facilityId]);
+            inventorySummaryByFacility = runService("getProductInventorySummaryForItems", [orderItems : orderItems, facilityId : facility.facilityId]);
             context.availableToPromiseByFacilityMap = inventorySummaryByFacility.availableToPromiseMap;
             context.quantityOnHandByFacilityMap = inventorySummaryByFacility.quantityOnHandMap;
             context.facility = facility;
@@ -395,8 +395,7 @@ if (orderHeader) {
     productionMap = [:];
     productIds.each { productId ->
         if (productId) {  // avoid order items without productIds, such as bulk order items
-            contextInput = [productId : productId, userLogin : userLogin];
-            resultOutput = dispatcher.runSync("getProductManufacturingSummaryByFacility", contextInput);
+            resultOutput = runService("getProductManufacturingSummaryByFacility", [productId : productId]);
             manufacturingInQuantitySummaryByFacility = resultOutput.summaryInByFacility;
             Double productionQuantity = 0;
             manufacturingInQuantitySummaryByFacility.values().each { manQuantity ->
@@ -432,7 +431,7 @@ if (orderHeader) {
 
     // Get a map of returnable items
     returnableItems = [:];
-    returnableItemServiceMap = dispatcher.runSync("getReturnableItems", [orderId : orderId]);
+    returnableItemServiceMap = runService("getReturnableItems", [orderId : orderId]);
     if (returnableItemServiceMap.returnableItems) {
         returnableItems = returnableItemServiceMap.returnableItems;
     }
@@ -523,7 +522,7 @@ if (shipments) {
     context.pickedShipmentId = pickedShipmentId;
     if (pickedShipmentId && shipmentRouteSegment.trackingIdNumber) {
         if ("UPS" == shipmentRouteSegment.carrierPartyId && productStore) {
-            resultMap = dispatcher.runSync('upsShipmentAlternateRatesEstimate', [productStoreId: productStore.productStoreId, shipmentId: pickedShipmentId]);
+            resultMap = runService('upsShipmentAlternateRatesEstimate', [productStoreId: productStore.productStoreId, shipmentId: pickedShipmentId]);
             shippingRates = resultMap.shippingRates;
             shippingRateList = [];
             shippingRates.each { shippingRate ->