Author: ashish
Date: Wed Dec 17 08:10:12 2014 New Revision: 1646167 URL: http://svn.apache.org/r1646167 Log: Applied patch from jira issue - OFBIZ-5892 - Replace all occurences of dispatcher.runSync in groovy files with runService() of DSL. Thanks Arun for the contribution. Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/actions/invoices/CommissionRun.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CompareProducts.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/InlineProductDetail.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/QuickAdd.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderDeliveryScheduleInfo.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/SelectCreatedProposed.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/QuickReturn.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryProducts.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/miniproductlist.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/QuickAddVariants.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Upcoming.groovy ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/request/RequestList.groovy ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPortlets.groovy ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/RetrieveStoreOptions.groovy ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/RespondPermAndPrep.groovy ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsToGooglebase.groovy ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListResourceBillingHours.groovy ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/AddProductBacklogItem.groovy ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditDailyHourReport.groovy ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditWeekTimesheet.groovy ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindProductBacklogItem.groovy ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumResource.groovy ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListTimeSheets.groovy ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ProductEmail.groovy Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy Wed Dec 17 08:10:12 2014 @@ -45,7 +45,7 @@ if (invoiceTypeId) { PastDueInvoices = delegator.findList("Invoice", expr, null, ["dueDate DESC"], null, false); if (PastDueInvoices) { invoiceIds = PastDueInvoices.invoiceId; - totalAmount = dispatcher.runSync("getInvoiceRunningTotal", [invoiceIds: invoiceIds, organizationPartyId: organizationPartyId, userLogin: userLogin]); + totalAmount = runService('getInvoiceRunningTotal', [invoiceIds: invoiceIds, organizationPartyId: organizationPartyId, userLogin: userLogin]); if (totalAmount) { context.PastDueInvoicestotalAmount = totalAmount.invoiceRunningTotal; } @@ -61,7 +61,7 @@ if (invoiceTypeId) { InvoicesDueSoon = delegator.findList("Invoice", invoicesCond, null, ["dueDate ASC"], findOptions, false); if (InvoicesDueSoon) { invoiceIds = InvoicesDueSoon.invoiceId; - totalAmount = dispatcher.runSync("getInvoiceRunningTotal", [invoiceIds: invoiceIds, organizationPartyId: organizationPartyId, userLogin: userLogin]); + totalAmount = runService('getInvoiceRunningTotal', [invoiceIds: invoiceIds, organizationPartyId: organizationPartyId, userLogin: userLogin]); if (totalAmount) { context.InvoicesDueSoonTotalAmount = totalAmount.invoiceRunningTotal; } Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy Wed Dec 17 08:10:12 2014 @@ -65,7 +65,7 @@ GenericValue accumAmortizationGlAccountC List accumAmortizationAccountClassIds = UtilAccounting.getDescendantGlAccountClassIds(accumAmortizationGlAccountClass); // Find the last closed time period to get the fromDate for the transactions in the current period and the ending balances of the last closed period -Map lastClosedTimePeriodResult = dispatcher.runSync("findLastClosedDate", UtilMisc.toMap("organizationPartyId", organizationPartyId, "findDate", new Date(thruDate.getTime()),"userLogin", userLogin)); +Map lastClosedTimePeriodResult = runService('findLastClosedDate', ["organizationPartyId": organizationPartyId, "findDate": new Date(thruDate.getTime()),"userLogin": userLogin]); Timestamp fromDate = (Timestamp)lastClosedTimePeriodResult.lastClosedDate; if (!fromDate) { return; @@ -410,7 +410,7 @@ transactionTotals.each { transactionTota transactionTotalsMap.put(transactionTotal.glAccountId, accountMap); } // Add the "retained earnings" account -Map netIncomeResult = dispatcher.runSync("prepareIncomeStatement", UtilMisc.toMap("organizationPartyId", organizationPartyId, "glFiscalTypeId", glFiscalTypeId, "fromDate", fromDate, "thruDate", thruDate,"userLogin", userLogin)); +Map netIncomeResult = runService('prepareIncomeStatement', ["organizationPartyId": organizationPartyId, "glFiscalTypeId": glFiscalTypeId, "fromDate": fromDate, "thruDate": thruDate, "userLogin": userLogin]); BigDecimal netIncome = (BigDecimal)netIncomeResult.totalNetIncome; GenericValue retainedEarningsAccount = delegator.findOne("GlAccountTypeDefault", UtilMisc.toMap("glAccountTypeId", "RETAINED_EARNINGS", "organizationPartyId", organizationPartyId), true); if (retainedEarningsAccount) { Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy Wed Dec 17 08:10:12 2014 @@ -56,7 +56,7 @@ List glAccountClassIds = UtilAccounting. List cashFlowBalanceTotalList = []; // Find the last closed time period to get the fromDate for the transactions in the current period and the ending balances of the last closed period -Map lastClosedTimePeriodResult = dispatcher.runSync("findLastClosedDate", ["organizationPartyId":organizationPartyId, "findDate":new Date(parametersFromDate.getTime()),"userLogin":userLogin]); +Map lastClosedTimePeriodResult = runService('findLastClosedDate', ["organizationPartyId":organizationPartyId, "findDate":new Date(parametersFromDate.getTime()),"userLogin":userLogin]); Timestamp periodClosingFromDate = (Timestamp)lastClosedTimePeriodResult.lastClosedDate; if (!periodClosingFromDate) { return; Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy Wed Dec 17 08:10:12 2014 @@ -26,7 +26,7 @@ import com.ibm.icu.util.Calendar; if (organizationPartyId) { onlyIncludePeriodTypeIdList = []; onlyIncludePeriodTypeIdList.add("FISCAL_YEAR"); - customTimePeriodResults = dispatcher.runSync("findCustomTimePeriods", [findDate : UtilDateTime.nowTimestamp(), organizationPartyId : organizationPartyId, onlyIncludePeriodTypeIdList : onlyIncludePeriodTypeIdList, userLogin : userLogin]); + customTimePeriodResults = runService('findCustomTimePeriods', [findDate : UtilDateTime.nowTimestamp(), organizationPartyId : organizationPartyId, onlyIncludePeriodTypeIdList : onlyIncludePeriodTypeIdList, userLogin : userLogin]); customTimePeriodList = customTimePeriodResults.customTimePeriodList; if (UtilValidate.isNotEmpty(customTimePeriodList)) { context.timePeriod = customTimePeriodList.first().customTimePeriodId; @@ -46,8 +46,7 @@ if (organizationPartyId) { if (parameters.timePeriod) { currentTimePeriod = delegator.findOne("CustomTimePeriod", [customTimePeriodId : parameters.timePeriod], false); - previousTimePeriodResult = dispatcher.runSync("getPreviousTimePeriod", - [customTimePeriodId : parameters.timePeriod, userLogin : userLogin]); + previousTimePeriodResult = runService('getPreviousTimePeriod', [customTimePeriodId : parameters.timePeriod, userLogin : userLogin]); previousTimePeriod = previousTimePeriodResult.previousTimePeriod; if (UtilValidate.isNotEmpty(previousTimePeriod)) { glAccountHistory = delegator.findOne("GlAccountHistory", @@ -76,7 +75,7 @@ if (organizationPartyId) { if ("ALL".equals(isPosted)) { isPosted = ""; } - acctgTransEntriesAndTransTotal = dispatcher.runSync("getAcctgTransEntriesAndTransTotal", + acctgTransEntriesAndTransTotal = runService('getAcctgTransEntriesAndTransTotal', [customTimePeriodStartDate : customTimePeriodStartDate, customTimePeriodEndDate : customTimePeriodEndDate, organizationPartyId : organizationPartyId, glAccountId : parameters.glAccountId, isPosted : isPosted, userLogin : userLogin]); totalOfYearToDateDebit = totalOfYearToDateDebit + acctgTransEntriesAndTransTotal.debitTotal; acctgTransEntriesAndTransTotal.totalOfYearToDateDebit = totalOfYearToDateDebit.setScale(decimals, rounding); Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy Wed Dec 17 08:10:12 2014 @@ -43,7 +43,7 @@ if (!glFiscalTypeId) { } // Find the last closed time period to get the fromDate for the transactions in the current period and the ending balances of the last closed period -Map lastClosedTimePeriodResult = dispatcher.runSync("findLastClosedDate", UtilMisc.toMap("organizationPartyId", organizationPartyId, "findDate", new Date(fromDate.getTime()),"userLogin", userLogin)); +Map lastClosedTimePeriodResult = runService('findLastClosedDate', ["organizationPartyId": organizationPartyId, "findDate": new Date(fromDate.getTime()),"userLogin": userLogin]); Timestamp lastClosedDate = (Timestamp)lastClosedTimePeriodResult.lastClosedDate; GenericValue lastClosedTimePeriod = null; if (lastClosedDate) { Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy Wed Dec 17 08:10:12 2014 @@ -41,7 +41,7 @@ if (parameters.customTimePeriodId) { postedCreditsTotal = 0 organizationGlAccounts.each { organizationGlAccount -> accountBalance = [:] - accountBalance = dispatcher.runSync('computeGlAccountBalanceForTimePeriod', [organizationPartyId: organizationGlAccount.organizationPartyId, customTimePeriodId: customTimePeriod.customTimePeriodId, glAccountId: organizationGlAccount.glAccountId, userLogin: userLogin]); + accountBalance = runService('computeGlAccountBalanceForTimePeriod', [organizationPartyId: organizationGlAccount.organizationPartyId, customTimePeriodId: customTimePeriod.customTimePeriodId, glAccountId: organizationGlAccount.glAccountId, userLogin: userLogin]); if (accountBalance.postedDebits != 0 || accountBalance.postedCredits != 0) { accountBalance.glAccountId = organizationGlAccount.glAccountId accountBalance.accountCode = organizationGlAccount.accountCode Modified: ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/actions/invoices/CommissionRun.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/actions/invoices/CommissionRun.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/actions/invoices/CommissionRun.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/actions/invoices/CommissionRun.groovy Wed Dec 17 08:10:12 2014 @@ -39,7 +39,7 @@ if (fromDate) { List invoices = []; if (invoiceList) { - resultMap = dispatcher.runSync("getInvoicesFilterByAssocType", [invoiceItemAssocTypeId : "COMMISSION_INVOICE", invoiceList : invoiceList, userLogin : userLogin]); + resultMap = runService('getInvoicesFilterByAssocType', [invoiceItemAssocTypeId : "COMMISSION_INVOICE", invoiceList : invoiceList, userLogin : userLogin]); invoices = resultMap.filteredInvoiceList; context.invoices = invoices; } Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy Wed Dec 17 08:10:12 2014 @@ -44,7 +44,7 @@ if (tree) { try { outMap = [:]; if (currencyUomId) { - outMap = dispatcher.runSync("getProductCost", [productId : node.getProduct().productId, + outMap = runService('getProductCost', [productId : node.getProduct().productId, currencyUomId : currencyUomId, costComponentTypePrefix : "EST_STD", userLogin : userLogin]); @@ -53,7 +53,7 @@ if (tree) { grandTotalCost = grandTotalCost + totalCost ?: 0; } if (facilityId) { - outMap = dispatcher.runSync("getInventoryAvailableByFacility", [productId : node.getProduct().productId, + outMap = runService('getInventoryAvailableByFacility', [productId : node.getProduct().productId, facilityId : facilityId, userLogin : userLogin]); qoh = outMap.quantityOnHandTotal; Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy Wed Dec 17 08:10:12 2014 @@ -49,7 +49,7 @@ if (shipment) { userLogin: userLogin]; result = [:]; - result = dispatcher.runSync("getNotAssembledComponents",inputPar); + result = runService('getNotAssembledComponents',inputPar); if (result) { components = (List)result.get("notAssembledComponents"); } @@ -63,7 +63,7 @@ if (shipment) { if (facilityId) { if (!inventoryStock.containsKey(oneComponent.getProduct().productId)) { serviceInput = [productId : oneComponent.getProduct().productId , facilityId : facilityId]; - serviceOutput = dispatcher.runSync("getInventoryAvailableByFacility",serviceInput); + serviceOutput = runService('getInventoryAvailableByFacility',serviceInput); qha = serviceOutput.quantityOnHandTotal ?: 0.0; inventoryStock.put(oneComponent.getProduct().productId, qha); } @@ -75,7 +75,7 @@ if (shipment) { // Now we get the products qty already reserved by production runs serviceInput = [productId : oneComponent.getProduct().productId, userLogin : userLogin]; - serviceOutput = dispatcher.runSync("getProductionRunTotResQty", serviceInput); + serviceOutput = runSevice('getProductionRunTotResQty', serviceInput); resQty = serviceOutput.reservedQuantity; record.reservedQuantity = resQty; records.add(record); Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy Wed Dec 17 08:10:12 2014 @@ -94,7 +94,7 @@ if (productStore) { productStoreFacilityId = productStore.inventoryFacilityId; } context.facilityId = productStoreFacilityId; -inventorySummary = dispatcher.runSync("getProductInventorySummaryForItems", [orderItems : shoppingCart.makeOrderItems(), facilityId : productStoreFacilityId]); +inventorySummary = runService('getProductInventorySummaryForItems', [orderItems : shoppingCart.makeOrderItems(), facilityId : productStoreFacilityId]); context.availableToPromiseMap = inventorySummary.availableToPromiseMap; context.quantityOnHandMap = inventorySummary.quantityOnHandMap; context.mktgPkgATPMap = inventorySummary.mktgPkgATPMap; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy Wed Dec 17 08:10:12 2014 @@ -115,7 +115,7 @@ for (supplierProduct in supplierProducts } product = delegator.findOne("Product", ["productId" : productId], true); productFacilityList.each { productFacility -> - result = dispatcher.runSync("getInventoryAvailableByFacility", ["productId" : productId, "facilityId" : productFacility.facilityId]); + result = runService('getInventoryAvailableByFacility', ["productId" : productId, "facilityId" : productFacility.facilityId]); qohAtp = result.quantityOnHandTotal.toPlainString() + "/" + result.availableToPromiseTotal.toPlainString(); productInfoMap = [:]; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy Wed Dec 17 08:10:12 2014 @@ -64,7 +64,7 @@ if (context.orderByFields) { } else { andMap.put("orderByFields", ["sequenceNum", "productId"]); } -catResult = dispatcher.runSync("getProductCategoryAndLimitedMembers", andMap); +catResult = runService('getProductCategoryAndLimitedMembers', andMap); productCategory = catResult.productCategory; productCategoryMembers = catResult.productCategoryMembers; context.productCategoryMembers = productCategoryMembers; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CompareProducts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CompareProducts.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CompareProducts.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CompareProducts.groovy Wed Dec 17 08:10:12 2014 @@ -54,7 +54,7 @@ compareList.each { product -> priceContext.agreementId = cart.getAgreementId(); priceContext.partyId = cart.getPartyId(); // IMPORTANT: otherwise it'll be calculating prices using the logged in user which could be a CSR instead of the customer priceContext.checkIncludeVat = "Y"; - productData.priceMap = dispatcher.runSync("calculateProductPrice", priceContext); + productData.priceMap = runService('calculateProductPrice', priceContext); condList = [ EntityCondition.makeCondition("productId", product.productId), Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/InlineProductDetail.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/InlineProductDetail.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/InlineProductDetail.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/InlineProductDetail.groovy Wed Dec 17 08:10:12 2014 @@ -134,13 +134,13 @@ if (inlineProduct) { priceContext.checkIncludeVat = "Y"; priceContext.agreementId = cart.getAgreementId(); priceContext.partyId = cart.getPartyId(); // IMPORTANT: must put this in, or price will be calculated for the CSR instead of the customer - priceMap = dispatcher.runSync("calculateProductPrice", priceContext); + priceMap = runService('calculateProductPrice', priceContext); context.priceMap = priceMap; } else { // purchase order: run the "calculatePurchasePrice" service priceContext = [product : inlineProduct, currencyUomId : cart.getCurrency(), partyId : cart.getPartyId(), userLogin : userLogin]; - priceMap = dispatcher.runSync("calculatePurchasePrice", priceContext); + priceMap = runService('calculatePurchasePrice', priceContext); context.priceMap = priceMap; } @@ -154,10 +154,10 @@ if (inlineProduct) { if ("VV_FEATURETREE".equals(ProductWorker.getProductVirtualVariantMethod(delegator, inlineProductId))) { context.featureLists = ProductWorker.getSelectableProductFeaturesByTypesAndSeq(inlineProduct); } else { - featureMap = dispatcher.runSync("getProductFeatureSet", [productId : inlineProductId]); + featureMap = runService("getProductFeatureSet", [productId : inlineProductId]); featureSet = featureMap.featureSet; if (featureSet) { - variantTreeMap = dispatcher.runSync("getProductVariantTree", [productId : inlineProductId, featureOrder : featureSet, productStoreId : productStoreId]); + variantTreeMap = runService('getProductVariantTree', [productId : inlineProductId, featureOrder : featureSet, productStoreId : productStoreId]); variantTree = variantTreeMap.variantTree; imageMap = variantTreeMap.variantSample; virtualVariant = variantTreeMap.virtualVariant; @@ -268,7 +268,7 @@ if (inlineProduct) { } // make a list of variant sku with requireAmount - variantsRes = dispatcher.runSync("getAssociatedProducts", [productId : inlineProductId, type : "PRODUCT_VARIANT", checkViewAllow : true, prodCatalogId : currentCatalogId]); + variantsRes = runService('getAssociatedProducts', [productId : inlineProductId, type : "PRODUCT_VARIANT", checkViewAllow : true, prodCatalogId : currentCatalogId]); variants = variantsRes.assocProducts; if (variants) { amt = new StringBuffer(); @@ -289,7 +289,7 @@ if (inlineProduct) { if (cart.isSalesOrder()) { // sales order: run the "calculateProductPrice" service priceContext.product = variant; - variantPriceMap = dispatcher.runSync("calculateProductPrice", priceContext); + variantPriceMap = runService('calculateProductPrice', priceContext); } amt.append(" if (sku == \"" + variant.productId + "\") return \"" + (variant.requireAmount ?: "N") + "\"; "); variantPriceJS.append(" if (sku == \"" + variant.productId + "\") return \"" + numberFormat.format(variantPriceMap.basePrice) + "\"; "); Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy Wed Dec 17 08:10:12 2014 @@ -136,7 +136,7 @@ if (product) { if (categoryId) { prevNextMap = [categoryId : categoryId, productId : productId]; prevNextMap.orderByFields = context.orderByFields ?: ["sequenceNum", "productId"]; - catNextPreviousResult = dispatcher.runSync("getPreviousNextProducts", prevNextMap); + catNextPreviousResult = runService('getPreviousNextProducts', prevNextMap); if (ServiceUtil.isError(catNextPreviousResult)) { request.setAttribute("errorMessageList", [ServiceUtil.getErrorMessage(catNextPreviousResult)]); return; @@ -182,13 +182,13 @@ if (product) { priceContext.checkIncludeVat = "Y"; priceContext.agreementId = cart.getAgreementId(); priceContext.partyId = cart.getPartyId(); // IMPORTANT: must put this in, or price will be calculated for the CSR instead of the customer - priceMap = dispatcher.runSync("calculateProductPrice", priceContext); + priceMap = runService('calculateProductPrice', priceContext); context.priceMap = priceMap; } else { // purchase order: run the "calculatePurchasePrice" service priceContext = [product : product, currencyUomId : cart.getCurrency(), partyId : cart.getPartyId(), userLogin : userLogin]; - priceMap = dispatcher.runSync("calculatePurchasePrice", priceContext); + priceMap = runService('calculatePurchasePrice', priceContext); context.priceMap = priceMap; } @@ -219,7 +219,7 @@ if (product) { context.daysToShip = productFacility?.daysToShip */ - resultOutput = dispatcher.runSync("getInventoryAvailableByFacility", [productId : productId, facilityId : facilityId, useCache : false]); + resultOutput = runService('getInventoryAvailableByFacility', [productId : productId, facilityId : facilityId, useCache : false]); totalAvailableToPromise = resultOutput.availableToPromiseTotal; if (totalAvailableToPromise) { productFacility = delegator.findOne("ProductFacility", [productId : productId, facilityId : facilityId], true); @@ -236,7 +236,7 @@ if (product) { } // get the product distinguishing features - disFeatureMap = dispatcher.runSync("getProductFeatures", [productId : productId, type : "DISTINGUISHING_FEAT"]); + disFeatureMap = runService('getProductFeatures', [productId : productId, type : "DISTINGUISHING_FEAT"]); disFeatureList = disFeatureMap.productFeatures; context.disFeatureList = disFeatureList; @@ -269,14 +269,14 @@ if (product) { if ("VV_FEATURETREE".equals(ProductWorker.getProductVirtualVariantMethod(delegator, productId))) { context.featureLists = ProductWorker.getSelectableProductFeaturesByTypesAndSeq(product); } else { - featureMap = dispatcher.runSync("getProductFeatureSet", [productId : productId]); + featureMap = runService('getProductFeatureSet', [productId : productId]); featureSet = featureMap.featureSet; if (featureSet) { //if order is purchase then don't calculate available inventory for product. if (cart.isPurchaseOrder()) { - variantTreeMap = dispatcher.runSync("getProductVariantTree", [productId : productId, featureOrder : featureSet, checkInventory: false]); + variantTreeMap = runService('getProductVariantTree', [productId : productId, featureOrder : featureSet, checkInventory: false]); } else { - variantTreeMap = dispatcher.runSync("getProductVariantTree", [productId : productId, featureOrder : featureSet, productStoreId : productStoreId]); + variantTreeMap = runService('getProductVariantTree', [productId : productId, featureOrder : featureSet, productStoreId : productStoreId]); } variantTree = variantTreeMap.variantTree; imageMap = variantTreeMap.variantSample; @@ -392,7 +392,7 @@ if (product) { } // make a list of variant sku with requireAmount - variantsRes = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "PRODUCT_VARIANT", checkViewAllow : true, prodCatalogId : currentCatalogId]); + variantsRes = runService('getAssociatedProducts', [productId : productId, type : "PRODUCT_VARIANT", checkViewAllow : true, prodCatalogId : currentCatalogId]); variants = variantsRes.assocProducts; variantPriceList = []; if (variants) { @@ -414,7 +414,7 @@ if (product) { priceContext.product = variant; if (cart.isSalesOrder()) { // sales order: run the "calculateProductPrice" service - variantPriceMap = dispatcher.runSync("calculateProductPrice", priceContext); + variantPriceMap = runService('calculateProductPrice', priceContext); BigDecimal calculatedPrice = (BigDecimal)variantPriceMap.get("price"); // Get the minimum quantity for variants if MINIMUM_ORDER_PRICE is set for variants. variantPriceMap.put("minimumQuantity", ShoppingCart.getMinimumOrderQuantity(delegator, calculatedPrice, variant.get("productId"))); @@ -440,7 +440,7 @@ if (product) { } variantPriceList.add(variantPriceMap); } else { - variantPriceMap = dispatcher.runSync("calculatePurchasePrice", priceContext); + variantPriceMap = runService('calculatePurchasePrice', priceContext); } amt.append(" if (sku == \"" + variant.productId + "\") return \"" + (variant.requireAmount ?: "N") + "\"; "); if (variantPriceMap && variantPriceMap.basePrice) { @@ -448,7 +448,7 @@ if (product) { } // make a list of virtual variants sku with requireAmount - virtualVariantsRes = dispatcher.runSync("getAssociatedProducts", [productIdTo : variant.productId, type : "ALTERNATIVE_PACKAGE", checkViewAllow : true, prodCatalogId : currentCatalogId]); + virtualVariantsRes = runService('getAssociatedProducts', [productIdTo : variant.productId, type : "ALTERNATIVE_PACKAGE", checkViewAllow : true, prodCatalogId : currentCatalogId]); virtualVariants = virtualVariantsRes.assocProducts; if(virtualVariants){ @@ -458,7 +458,7 @@ if (product) { priceContext.product = virtual; if (cart.isSalesOrder()) { // sales order: run the "calculateProductPrice" service - virtualPriceMap = dispatcher.runSync("calculateProductPrice", priceContext); + virtualPriceMap = runService('calculateProductPrice', priceContext); BigDecimal calculatedPrice = (BigDecimal)virtualPriceMap.get("price"); // Get the minimum quantity for variants if MINIMUM_ORDER_PRICE is set for variants. virtualPriceMap.put("minimumQuantity", ShoppingCart.getMinimumOrderQuantity(delegator, calculatedPrice, virtual.get("productId"))); @@ -485,7 +485,7 @@ if (product) { variantPriceList.add(virtualPriceMap); variantPriceJS.append(" if (sku == \"" + virtual.productId + "\") return \"" + UtilFormatOut.formatCurrency(variantPriceMap.basePrice, currencyUomId, locale, 10) + "\"; "); } else { - virtualPriceMap = dispatcher.runSync("calculatePurchasePrice", priceContext); + virtualPriceMap = runService('calculatePurchasePrice', priceContext); variantPriceJS.append(" if (sku == \"" + virtual.productId + "\") return \"" + UtilFormatOut.formatCurrency(variantPriceMap.price, currencyUomId, locale, 10) + "\"; "); } } @@ -512,7 +512,7 @@ if (product) { jsBuf.append("<script language=\"JavaScript\" type=\"text/javascript\">"); // make a list of variant sku with requireAmount - virtualVariantsRes = dispatcher.runSync("getAssociatedProducts", [productIdTo : productId, type : "ALTERNATIVE_PACKAGE", checkViewAllow : true, prodCatalogId : categoryId]); + virtualVariantsRes = runService('getAssociatedProducts', [productIdTo : productId, type : "ALTERNATIVE_PACKAGE", checkViewAllow : true, prodCatalogId : categoryId]); virtualVariants = virtualVariantsRes.assocProducts; // Format to apply the currency code to the variant price in the javascript if (productStore) { @@ -535,13 +535,13 @@ if (product) { priceContext.product = virtual; if (cart.isSalesOrder()) { // sales order: run the "calculateProductPrice" service - virtualPriceMap = dispatcher.runSync("calculateProductPrice", priceContext); + virtualPriceMap = runService('calculateProductPrice', priceContext); BigDecimal calculatedPrice = (BigDecimal)virtualPriceMap.get("price"); // Get the minimum quantity for variants if MINIMUM_ORDER_PRICE is set for variants. virtualVariantPriceList.add(virtualPriceMap); variantPriceJS.append(" if (sku == \"" + virtual.productId + "\") return \"" + UtilFormatOut.formatCurrency(virtualPriceMap.basePrice, currencyUomId, locale, 10) + "\"; "); } else { - virtualPriceMap = dispatcher.runSync("calculatePurchasePrice", priceContext); + virtualPriceMap = runService('calculatePurchasePrice', priceContext); variantPriceJS.append(" if (sku == \"" + virtual.productId + "\") return \"" + UtilFormatOut.formatCurrency(virtualPriceMap.price, currencyUomId, locale, 10) + "\"; "); } } @@ -560,7 +560,7 @@ if (product) { // if the product is a MARKETING_PKG_AUTO/PICK, then also get the quantity which can be produced from components if (isMarketingPackage) { - resultOutput = dispatcher.runSync("getMktgPackagesAvailable", [productId : productId]); + resultOutput = runService('getMktgPackagesAvailable', [productId : productId]); availableInventory = resultOutput.availableToPromiseTotal; } else { //get last inventory count from product facility for the product @@ -577,22 +577,22 @@ if (product) { context.availableInventory = availableInventory; // get product associations - alsoBoughtProducts = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "ALSO_BOUGHT", checkViewAllow : true, prodCatalogId : currentCatalogId, bidirectional : false, sortDescending : true]); + alsoBoughtProducts = runService('getAssociatedProducts', [productId : productId, type : "ALSO_BOUGHT", checkViewAllow : true, prodCatalogId : currentCatalogId, bidirectional : false, sortDescending : true]); context.alsoBoughtProducts = alsoBoughtProducts.assocProducts; - obsoleteProducts = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "PRODUCT_OBSOLESCENCE", checkViewAllow : true, prodCatalogId : currentCatalogId]); + obsoleteProducts = runService('getAssociatedProducts', [productId : productId, type : "PRODUCT_OBSOLESCENCE", checkViewAllow : true, prodCatalogId : currentCatalogId]); context.obsoleteProducts = obsoleteProducts.assocProducts; - crossSellProducts = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "PRODUCT_COMPLEMENT", checkViewAllow : true, prodCatalogId : currentCatalogId]); + crossSellProducts = runService('getAssociatedProducts', [productId : productId, type : "PRODUCT_COMPLEMENT", checkViewAllow : true, prodCatalogId : currentCatalogId]); context.crossSellProducts = crossSellProducts.assocProducts; - upSellProducts = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "PRODUCT_UPGRADE", checkViewAllow : true, prodCatalogId : currentCatalogId]); + upSellProducts = runService('getAssociatedProducts', [productId : productId, type : "PRODUCT_UPGRADE", checkViewAllow : true, prodCatalogId : currentCatalogId]); context.upSellProducts = upSellProducts.assocProducts; - obsolenscenseProducts = dispatcher.runSync("getAssociatedProducts", [productIdTo : productId, type : "PRODUCT_OBSOLESCENCE", checkViewAllow : true, prodCatalogId : currentCatalogId]); + obsolenscenseProducts = runService('getAssociatedProducts', [productIdTo : productId, type : "PRODUCT_OBSOLESCENCE", checkViewAllow : true, prodCatalogId : currentCatalogId]); context.obsolenscenseProducts = obsolenscenseProducts.assocProducts; - accessoryProducts = dispatcher.runSync("getAssociatedProducts", [productId : productId, type : "PRODUCT_ACCESSORY", checkViewAllow : true, prodCatalogId : currentCatalogId]); + accessoryProducts = runService('getAssociatedProducts', [productId : productId, type : "PRODUCT_ACCESSORY", checkViewAllow : true, prodCatalogId : currentCatalogId]); context.accessoryProducts = accessoryProducts.assocProducts; /* @@ -643,7 +643,7 @@ if (product) { context.downloadProductContentAndInfoList = downloadProductContentAndInfoList; // not the best to save info in an action, but this is probably the best place to count a view; it is done async - dispatcher.runAsync("countProductView", [productId : productId, weight : new Long(1)], false); + runService('countProductView', [productId : productId, weight : new Long(1)], false); //get product image from image management productImageList = []; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy Wed Dec 17 08:10:12 2014 @@ -75,7 +75,7 @@ if (!product && productId) { if (product) { //if order is purchase then don't calculate available inventory for product. if (cart.isSalesOrder()) { - resultOutput = dispatcher.runSync("getInventoryAvailableByFacility", [productId : product.productId, facilityId : facilityId, useCache : true]); + resultOutput = runService('getInventoryAvailableByFacility', [productId : product.productId, facilityId : facilityId, useCache : true]); totalAvailableToPromise = resultOutput.availableToPromiseTotal; if (totalAvailableToPromise && totalAvailableToPromise.doubleValue() > 0) { productFacility = delegator.findOne("ProductFacility", [productId : product.productId, facilityId : facilityId], true); @@ -113,14 +113,14 @@ if (product) { priceContext.agreementId = cart.getAgreementId(); priceContext.partyId = cart.getPartyId(); // IMPORTANT: otherwise it'll be calculating prices using the logged in user which could be a CSR instead of the customer priceContext.checkIncludeVat = "Y"; - priceMap = dispatcher.runSync("calculateProductPrice", priceContext); + priceMap = runService('calculateProductPrice', priceContext); context.price = priceMap; } else { // purchase order: run the "calculatePurchasePrice" service priceContext = [product : product, currencyUomId : cart.getCurrency(), partyId : cart.getPartyId(), userLogin : userLogin]; - priceMap = dispatcher.runSync("calculatePurchasePrice", priceContext); + priceMap = runService('calculatePurchasePrice', priceContext); context.price = priceMap; } @@ -160,7 +160,7 @@ if (product) { jsBuf.append("<script language=\"JavaScript\" type=\"text/javascript\">"); // make a list of variant sku with requireAmount - virtualVariantsRes = dispatcher.runSync("getAssociatedProducts", [productIdTo : productId, type : "ALTERNATIVE_PACKAGE", checkViewAllow : true, prodCatalogId : categoryId]); + virtualVariantsRes = runService('getAssociatedProducts', [productIdTo : productId, type : "ALTERNATIVE_PACKAGE", checkViewAllow : true, prodCatalogId : categoryId]); virtualVariants = virtualVariantsRes.assocProducts; // Format to apply the currency code to the variant price in the javascript if (productStore) { @@ -184,12 +184,12 @@ if (product) { priceContext.product = virtual; if (cart.isSalesOrder()) { // sales order: run the "calculateProductPrice" service - virtualPriceMap = dispatcher.runSync("calculateProductPrice", priceContext); + virtualPriceMap = runService('calculateProductPrice', priceContext); BigDecimal calculatedPrice = (BigDecimal)virtualPriceMap.get("price"); // Get the minimum quantity for variants if MINIMUM_ORDER_PRICE is set for variants. variantPriceList.add(virtualPriceMap); } else { - virtualPriceMap = dispatcher.runSync("calculatePurchasePrice", priceContext); + virtualPriceMap = runService('calculatePurchasePrice', priceContext); } variantPriceJS.append(" if (sku == \"" + virtual.productId + "\") return \"" + numberFormat.format(virtualPriceMap.basePrice) + "\"; "); } Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/QuickAdd.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/QuickAdd.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/QuickAdd.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/QuickAdd.groovy Wed Dec 17 08:10:12 2014 @@ -39,7 +39,7 @@ context.categoryId = categoryId; if (categoryId) { fields = [productCategoryId : categoryId, defaultViewSize : 10, limitView : false, prodCatalogId : currentCatalogId, checkViewAllow : true]; - result = dispatcher.runSync("getProductCategoryAndLimitedMembers", fields); + result = runService('getProductCategoryAndLimitedMembers', fields); if (result) { result.each { key, value -> context[key] = value; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderDeliveryScheduleInfo.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderDeliveryScheduleInfo.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderDeliveryScheduleInfo.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderDeliveryScheduleInfo.groovy Wed Dec 17 08:10:12 2014 @@ -32,8 +32,7 @@ if (orderHeader) { schedule = delegator.findOne("OrderDeliverySchedule", [orderId : orderId, orderItemSeqId : "_NA_"], false); // Determine whether the current user can VIEW the order -checkMap = [orderId : orderId, userLogin : session.getAttribute("userLogin"), checkAction : "VIEW"]; -checkResult = dispatcher.runSync("checkSupplierRelatedOrderPermission", checkMap); +checkResult = runService('checkSupplierRelatedOrderPermission', [orderId : orderId, userLogin : session.getAttribute("userLogin"), checkAction : "VIEW"]); hasSupplierRelatedPermissionStr = checkResult.hasSupplierRelatedPermission; // Determine what the reuslt is, no result is FALSE Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.groovy Wed Dec 17 08:10:12 2014 @@ -17,9 +17,9 @@ * under the License. */ -prepare = dispatcher.runSync("prepareFind", [inputFields : parameters, entityName : "Requirement"]); +prepare = runService('prepareFind', [inputFields : parameters, entityName : "Requirement"]); if (prepare.entityConditionList) { - results = dispatcher.runSync("getRequirementsForSupplier", [requirementConditions : prepare.entityConditionList, partyId : parameters.partyId]); + results = runService('getRequirementsForSupplier', [requirementConditions : prepare.entityConditionList, partyId : parameters.partyId]); context.requirementsForSupplier = results.requirementsForSupplier; context.quantityReport = [distinctProductCount : results.distinctProductCount, quantityTotal : results.quantityTotal, amountTotal : results.amountTotal]; } Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/SelectCreatedProposed.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/SelectCreatedProposed.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/SelectCreatedProposed.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/SelectCreatedProposed.groovy Wed Dec 17 08:10:12 2014 @@ -24,7 +24,7 @@ import org.ofbiz.entity.condition.Entity import org.ofbiz.entity.condition.EntityExpr; import org.ofbiz.entity.condition.EntityOperator; -prepare = dispatcher.runSync("prepareFind", [inputFields : parameters, entityName : "Requirement"]); +prepare = runService('prepareFind', [inputFields : parameters, entityName : "Requirement"]); statusCondition = EntityCondition.makeCondition([ EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "REQ_CREATED"), EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "REQ_PROPOSED")], @@ -35,5 +35,5 @@ if (prepare.entityConditionList) { } else { ecl = statusCondition; } -results = dispatcher.runSync("executeFind", [entityConditionList : ecl, entityName : "Requirement"]); +results = runService('executeFind', [entityConditionList : ecl, entityName : "Requirement"]); context.requirements = results.listIt; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/QuickReturn.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/QuickReturn.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/QuickReturn.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/QuickReturn.groovy Wed Dec 17 08:10:12 2014 @@ -92,7 +92,7 @@ returnItemTypeMap.each { value -> context.returnItemTypeMap = typeMap; if (orderId) { - returnRes = dispatcher.runSync("getReturnableItems", [orderId : orderId]); + returnRes = runService('getReturnableItems', [orderId : orderId]); context.returnableItems = returnRes.returnableItems; orderHeader = delegator.findOne("OrderHeader", [orderId : orderId], false); context.orderHeader = orderHeader; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy Wed Dec 17 08:10:12 2014 @@ -65,7 +65,7 @@ context.returnItemTypeMap = typeMap; if (orderId) { order = delegator.findOne("OrderHeader", [orderId : orderId], false); - returnRes = dispatcher.runSync("getReturnableItems", [orderId : orderId]); + returnRes = runService('getReturnableItems', [orderId : orderId]); context.returnableItems = returnRes.returnableItems; orh = new OrderReadHelper(order); @@ -73,7 +73,7 @@ if (orderId) { context.orderHeaderAdjustments = orh.getAvailableOrderHeaderAdjustments(); // get the order shipping amount - shipRes = dispatcher.runSync("getOrderShippingAmount", [orderId : orderId]); + shipRes = runService('getOrderShippingAmount', [orderId : orderId]); shippingAmount = shipRes.shippingAmount; context.shippingAmount = shippingAmount; } Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy Wed Dec 17 08:10:12 2014 @@ -83,8 +83,7 @@ if (shoppingListId) { product = shoppingListItem.getRelatedOne("Product", true); // DEJ20050704 not sure about calculating price here, will have some bogus data when not in a store webapp - calcPriceInMap = [product : product, quantity : shoppingListItem.quantity , currencyUomId : currencyUomId, userLogin : userLogin, productStoreId : shoppingList.productStoreId]; - calcPriceOutMap = dispatcher.runSync("calculateProductPrice", calcPriceInMap); + calcPriceOutMap = runService('calculateProductPrice', [product : product, quantity : shoppingListItem.quantity , currencyUomId : currencyUomId, userLogin : userLogin, productStoreId : shoppingList.productStoreId]); price = calcPriceOutMap.price; totalPrice = price * shoppingListItem.getDouble("quantity"); shoppingListItemTotal += totalPrice; Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy Wed Dec 17 08:10:12 2014 @@ -30,7 +30,7 @@ if (context.noConditionFind == null) { if (context.filterByDate == null) { context.filterByDate = parameters.filterByDate; } -prepareResult = dispatcher.runSync("prepareFind", [entityName : context.entityName, +prepareResult = runService('prepareFind', [entityName : context.entityName, orderBy : context.orderBy, inputFields : parameters, filterByDate : context.filterByDate, @@ -50,7 +50,7 @@ if (prepareResult.entityConditionList != entityConditionList = statusPartyDisable; } -executeResult = dispatcher.runSync("executeFind", [entityName : context.entityName, +executeResult = runService('executeFind', [entityName : context.entityName, orderByList : prepareResult.orderByList, entityConditionList : entityConditionList, noConditionFind :context.noConditionFind Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy Wed Dec 17 08:10:12 2014 @@ -27,9 +27,8 @@ if (partyId) { monthsToInclude = 12; - Map serviceIn = UtilMisc.toMap("partyId", partyId, "roleTypeId", "PLACING_CUSTOMER", "orderTypeId", "SALES_ORDER", - "statusId", "ORDER_COMPLETED", "monthsToInclude", monthsToInclude, "userLogin", system); - Map result = dispatcher.runSync("getOrderedSummaryInformation", serviceIn); + Map result = runService('getOrderedSummaryInformation', ["partyId": partyId, "roleTypeId": "PLACING_CUSTOMER", "orderTypeId": "SALES_ORDER", + "statusId": "ORDER_COMPLETED", "monthsToInclude": monthsToInclude, "userLogin": system]); context.monthsToInclude = monthsToInclude; context.totalSubRemainingAmount = result.totalSubRemainingAmount; Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryProducts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryProducts.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryProducts.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryProducts.groovy Wed Dec 17 08:10:12 2014 @@ -34,7 +34,7 @@ paramInMap.viewIndexString = parameters. paramInMap.viewSizeString = parameters.get("VIEW_SIZE"); // Returns: viewIndex, viewSize, lowIndex, highIndex, listSize, productCategory, productCategoryMembers -outMap = dispatcher.runSync("getProductCategoryAndLimitedMembers", paramInMap); +outMap = runService('getProductCategoryAndLimitedMembers', paramInMap); context.viewIndex = outMap.viewIndex; context.viewSize = outMap.viewSize; context.lowIndex = outMap.lowIndex; Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/miniproductlist.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/miniproductlist.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/miniproductlist.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/miniproductlist.groovy Wed Dec 17 08:10:12 2014 @@ -42,7 +42,7 @@ if (isOpen) { paramInMap.checkViewAllow = false; // Returns: viewIndex, viewSize, lowIndex, highIndex, listSize, productCategory, productCategoryMembers - outMap = dispatcher.runSync("getProductCategoryAndLimitedMembers", paramInMap); + outMap = runService('getProductCategoryAndLimitedMembers', paramInMap); context.viewIndex = outMap.viewIndex; context.viewSize = outMap.viewSize; context.lowIndex = outMap.lowIndex; Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy Wed Dec 17 08:10:12 2014 @@ -24,7 +24,7 @@ productVariantId = productId + "_"; productFeatureIds = ""; product = delegator.findOne("Product", [productId : productId], false); -result = dispatcher.runSync("getProductFeaturesByType", [productId : productId, productFeatureApplTypeId : "SELECTABLE_FEATURE"]); +result = runService('getProductFeaturesByType', [productId : productId, productFeatureApplTypeId : "SELECTABLE_FEATURE"]); featureTypes = result.productFeatureTypes; featuresByTypes = result.productFeaturesByType; searchFeatures = []; @@ -48,7 +48,7 @@ if (featureTypes) { variants = []; //if (selectedFeatureTypeValues) { - result = dispatcher.runSync("getAllExistingVariants", [productId : productId, productFeatureAppls : selectedFeatureTypeValues]); + result = runService('getAllExistingVariants', [productId : productId, productFeatureAppls : selectedFeatureTypeValues]); variants = result.variantProductIds; //} @@ -56,7 +56,7 @@ variants = []; productFeatureIdsPar = request.getParameter("productFeatureIds"); productVariantIdPar = request.getParameter("productVariantId"); if (productVariantIdPar && productFeatureIdsPar) { - result = dispatcher.runSync("quickAddVariant", [productId : productId, productFeatureIds : productFeatureIdsPar, productVariantId : productVariantIdPar]); + result = runService('quickAddVariant', [productId : productId, productFeatureIds : productFeatureIdsPar, productVariantId : productVariantIdPar]); } context.product = product; Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy Wed Dec 17 08:10:12 2014 @@ -84,8 +84,7 @@ if ("FULFILLMENT_EMAIL".equals(productCo emailData.subject = subject.textData; emailData.subjectDataResourceId = subject.dataResourceId; } - serviceCtx = [userLogin : userLogin, contentId : contentId, mapKeys : ['plainBody', 'htmlBody']]; - result = dispatcher.runSync("findAssocContent", serviceCtx); + result = runService('findAssocContent', [userLogin : userLogin, contentId : contentId, mapKeys : ['plainBody', 'htmlBody']]); contentAssocs = result.get("contentAssocs"); if (contentAssocs) { contentAssocs.each { contentAssoc -> Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy Wed Dec 17 08:10:12 2014 @@ -27,11 +27,11 @@ if (product) { //If product is virtual gather summary data from variants if (product.isVirtual && "Y".equals(product.isVirtual)) { //Get the virtual product feature types - result = dispatcher.runSync("getProductFeaturesByType", [productId : productId, productFeatureApplTypeId : 'SELECTABLE_FEATURE']); + result = runService('getProductFeaturesByType', [productId : productId, productFeatureApplTypeId : 'SELECTABLE_FEATURE']); featureTypeIds = result.productFeatureTypes; //Get the variants - result = dispatcher.runSync("getAllProductVariants", [productId : productId]); + result = runService('getAllProductVariants', [productId : productId]); variants = result.assocProducts; variantIterator = variants.iterator(); variantInventorySummaries = []; @@ -39,7 +39,7 @@ if (product) { variant = variantIterator.next(); //create a map of each variant id and inventory summary (all facilities) - inventoryAvailable = dispatcher.runSync("getProductInventoryAvailable", [productId : variant.productIdTo]); + inventoryAvailable = runService('getProductInventoryAvailable', [productId : variant.productIdTo]); variantInventorySummary = [productId : variant.productIdTo, availableToPromiseTotal : inventoryAvailable.availableToPromiseTotal, @@ -49,7 +49,7 @@ if (product) { featureTypeIdsIterator = featureTypeIds.iterator(); while (featureTypeIdsIterator) { featureTypeId = featureTypeIdsIterator.next(); - result = dispatcher.runSync("getProductFeatures", [productId : variant.productIdTo, type : 'STANDARD_FEATURE', distinct : featureTypeId]); + result = runService('getProductFeatures', [productId : variant.productIdTo, type : 'STANDARD_FEATURE', distinct : featureTypeId]); variantFeatures = result.productFeatures; if (variantFeatures) { //there should only be one result in this collection @@ -80,7 +80,7 @@ if (product) { // are obtained (calling the "getInventoryAvailableByFacility" service) while (facilityIterator) { facility = facilityIterator.next(); - resultOutput = dispatcher.runSync("getInventoryAvailableByFacility", [productId : productId, facilityId : facility.facilityId]); + resultOutput = runService('getInventoryAvailableByFacility', [productId : productId, facilityId : facility.facilityId]); quantitySummary = [:]; quantitySummary.facilityId = facility.facilityId; @@ -89,7 +89,7 @@ if (product) { // if the product is a MARKETING_PKG_AUTO/PICK, then also get the quantity which can be produced from components if (isMarketingPackage) { - resultOutput = dispatcher.runSync("getMktgPackagesAvailable", [productId : productId, facilityId : facility.facilityId]); + resultOutput = runService('getMktgPackagesAvailable', [productId : productId, facilityId : facility.facilityId]); quantitySummary.mktgPkgQOH = resultOutput.quantityOnHandTotal; quantitySummary.mktgPkgATP = resultOutput.availableToPromiseTotal; } @@ -143,7 +143,7 @@ if (product) { // -------------------- // Production Runs - resultOutput = dispatcher.runSync("getProductManufacturingSummaryByFacility", + resultOutput = runService('getProductManufacturingSummaryByFacility', [productId : productId, userLogin : userLogin]); // incoming products manufacturingInQuantitySummaryByFacility = resultOutput.summaryInByFacility; Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/QuickAddVariants.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/QuickAddVariants.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/QuickAddVariants.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/QuickAddVariants.groovy Wed Dec 17 08:10:12 2014 @@ -17,8 +17,8 @@ * under the License. */ -result = dispatcher.runSync("getProductFeaturesByType", [productId : productId, productFeatureApplTypeId : 'SELECTABLE_FEATURE']); +result = runService('getProductFeaturesByType', [productId : productId, productFeatureApplTypeId : 'SELECTABLE_FEATURE']); context.featureTypes = result.productFeatureTypes; -result = dispatcher.runSync("getVariantCombinations", [productId : productId]); +result = runService('getVariantCombinations', [productId : productId]); context.featureCombinationInfos = result.featureCombinations; Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy Wed Dec 17 08:10:12 2014 @@ -28,9 +28,9 @@ if (parameters.fromDateSellThrough) { fromDate = Timestamp.valueOf(parameters.fromDateSellThrough); thruDate = Timestamp.valueOf(parameters.thruDateSellThrough); } catch(Exception e) {} - inventoryCountResult = dispatcher.runSync("countProductInventoryOnHand", [productId : productId, facilityId : facilityId, inventoryCountDate : fromDate, userLogin : userLogin]); + inventoryCountResult = runService('countProductInventoryOnHand', [productId : productId, facilityId : facilityId, inventoryCountDate : fromDate, userLogin : userLogin]); if (inventoryCountResult.quantityOnHandTotal && inventoryCountResult.quantityOnHandTotal > 0) { - inventoryShippedForSalesResult = dispatcher.runSync("countProductInventoryShippedForSales", [productId : productId, facilityId : facilityId, fromDate : fromDate, thruDate : thruDate, userLogin : userLogin]); + inventoryShippedForSalesResult = runService('countProductInventoryShippedForSales', [productId : productId, facilityId : facilityId, fromDate : fromDate, thruDate : thruDate, userLogin : userLogin]); context.sellThroughInitialInventory = inventoryCountResult.quantityOnHandTotal; context.sellThroughInventorySold = inventoryShippedForSalesResult.quantityOnHandTotal; context.sellThroughPercentage = new BigDecimal(inventoryShippedForSalesResult.quantityOnHandTotal / inventoryCountResult.quantityOnHandTotal * 100, new java.math.MathContext(2)); Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy Wed Dec 17 08:10:12 2014 @@ -173,7 +173,7 @@ if (action) { oneInventory.reorderQuantity = oneProd.reorderQuantity; oneInventory.daysToShip = oneProd.daysToShip; - resultMap = dispatcher.runSync("getProductInventoryAndFacilitySummary", [productId : oneProd.productId, minimumStock : minimumStock, facilityId : oneProd.facilityId, checkTime : checkTime, statusId : statusId]); + resultMap =runService('getProductInventoryAndFacilitySummary', [productId : oneProd.productId, minimumStock : minimumStock, facilityId : oneProd.facilityId, checkTime : checkTime, statusId : statusId]); if (resultMap) { oneInventory.totalAvailableToPromise = resultMap.totalAvailableToPromise; oneInventory.totalQuantityOnHand = resultMap.totalQuantityOnHand; Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.groovy Wed Dec 17 08:10:12 2014 @@ -53,7 +53,7 @@ if (conditions.size() > 2) { // for each product, call the inventory counting service productIds.each { productId -> - result = dispatcher.runSync("getInventoryAvailableByFacility", [facilityId : facilityId, productId : productId]); + result = runService('getInventoryAvailableByFacility', [facilityId : facilityId, productId : productId]); if (!ServiceUtil.isError(result)) { atpMap.put(productId, result.availableToPromiseTotal); qohMap.put(productId, result.quantityOnHandTotal); Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy Wed Dec 17 08:10:12 2014 @@ -35,7 +35,7 @@ inventoryAverageCosts = FastList.newInst inventoryItemProducts.each { productId -> productFacility = delegator.findOne("ProductFacility", UtilMisc.toMap("productId", productId, "facilityId", facilityId), false); if (UtilValidate.isNotEmpty(productFacility)) { - result = dispatcher.runSync("calculateProductAverageCost", UtilMisc.toMap("productId", productId, "facilityId", facilityId, "userLogin", userLogin)); + result = runService('calculateProductAverageCost', UtilMisc.toMap("productId": productId, "facilityId": facilityId, "userLogin": userLogin)); totalQuantityOnHand = result.get("totalQuantityOnHand"); totalInventoryCost = result.get("totalInventoryCost"); Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy Wed Dec 17 08:10:12 2014 @@ -41,7 +41,7 @@ ownerAcctgPref = null; if (facility) { owner = facility.getRelatedOne("OwnerParty", false); if (owner) { - result = dispatcher.runSync("getPartyAccountingPreferences", [organizationPartyId : owner.partyId, userLogin : request.getAttribute("userLogin")]); + result = runService('getPartyAccountingPreferences', [organizationPartyId : owner.partyId, userLogin : request.getAttribute("userLogin")]); if (!ServiceUtil.isError(result) && result.partyAccountingPreference) { ownerAcctgPref = result.partyAccountingPreference; } @@ -141,7 +141,7 @@ if (purchaseOrder && facility) { if (!orderCurrencyUomId.equals(ownerCurrencyUomId)) { purchaseOrderItems.each { item -> orderCurrencyUnitPriceMap.(item.orderItemSeqId) = item.unitPrice; - serviceResults = dispatcher.runSync("convertUom", + serviceResults = runService('convertUom', [uomId : orderCurrencyUomId, uomIdTo : ownerCurrencyUomId, originalValue : item.unitPrice]); if (ServiceUtil.isError(serviceResults)) { request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(serviceResults)); @@ -229,7 +229,7 @@ if (ownerAcctgPref) { purchaseOrderItems.each { orderItem -> productId = orderItem.productId; if (productId) { - result = dispatcher.runSync("getProductCost", [productId : productId, currencyUomId : ownerAcctgPref.baseCurrencyUomId, + result = runService('getProductCost', [productId : productId, currencyUomId : ownerAcctgPref.baseCurrencyUomId, costComponentTypePrefix : 'EST_STD', userLogin : request.getAttribute("userLogin")]); if (!ServiceUtil.isError(result)) { standardCosts.put(productId, result.productCost); @@ -240,7 +240,7 @@ if (ownerAcctgPref) { // get the unit cost of a single product if (productId) { - result = dispatcher.runSync("getProductCost", [productId : productId, currencyUomId : ownerAcctgPref.baseCurrencyUomId, + result = runService('getProductCost', [productId : productId, currencyUomId : ownerAcctgPref.baseCurrencyUomId, costComponentTypePrefix : 'EST_STD', userLogin : request.getAttribute("userLogin")]); if (!ServiceUtil.isError(result)) { standardCosts.put(productId, result.productCost); Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy Wed Dec 17 08:10:12 2014 @@ -89,7 +89,7 @@ baseCurrencyUomId = null; if (facility) { owner = facility.getRelatedOne("OwnerParty", false); if (owner) { - result = dispatcher.runSync("getPartyAccountingPreferences", [organizationPartyId : owner.partyId, userLogin : request.getAttribute("userLogin")]); + result = runService('getPartyAccountingPreferences', [organizationPartyId : owner.partyId, userLogin : request.getAttribute("userLogin")]); if (!ServiceUtil.isError(result) && result.partyAccountingPreference) { ownerAcctgPref = result.partyAccountingPreference; } @@ -161,7 +161,7 @@ orderItems.each { orderItemAndShipGroupA // Update the unit cost with the converted value, if any if (baseCurrencyUomId && orderHeader.currencyUom) { if (product) { - result = dispatcher.runSync("convertUom", [uomId : orderHeader.currencyUom, uomIdTo : baseCurrencyUomId, originalValue : orderItem.unitPrice]); + result = runService('convertUom', [uomId : orderHeader.currencyUom, uomIdTo : baseCurrencyUomId, originalValue : orderItem.unitPrice]); if (!ServiceUtil.isError(result)) { orderItem.unitPrice = result.convertedValue; } Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy (original) +++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy Wed Dec 17 08:10:12 2014 @@ -40,7 +40,7 @@ serviceCtx.putAll(UtilMisc.toMap("userLo if (context.entityExprList) { serviceCtx.entityExprList = entityExprList; } -Map result = dispatcher.runSync("getWorkEffortEventsByPeriod", serviceCtx); +Map result = runService('getWorkEffortEventsByPeriod', serviceCtx); context.put("periods", result.get("periods")); context.put("maxConcurrentEntries", result.get("maxConcurrentEntries")); context.put("start", start); Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy?rev=1646167&r1=1646166&r2=1646167&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy (original) +++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy Wed Dec 17 08:10:12 2014 @@ -62,7 +62,7 @@ serviceCtx.putAll(UtilMisc.toMap("userLo if (context.entityExprList) { serviceCtx.entityExprList = entityExprList; } -result = dispatcher.runSync("getWorkEffortEventsByPeriod", serviceCtx); +result = runService('getWorkEffortEventsByPeriod', serviceCtx); context.put("periods",result.get("periods")); context.put("maxConcurrentEntries", result.get("maxConcurrentEntries")); context.put("start", start); |
Free forum by Nabble | Edit this page |