[OFBiz] SVN: r7317 - in trunk/applications/manufacturing: servicedef src/org/ofbiz/manufacturing/jobshopmgt webapp/manufacturing/WEB-INF/actions/jobshopmgt webapp/manufacturing/jobshopmgt
jacopo@svn.ofbiz.org
jacopo at svn.ofbiz.org
Mon Apr 17 12:14:48 CDT 2006
Author: jacopo
Date: 2006-04-17 12:14:31 -0500 (Mon, 17 Apr 2006)
New Revision: 7317
Modified:
trunk/applications/manufacturing/servicedef/services_production_run.xml
trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ShowProductionRun.bsh
Log:
Some misc mods to make the it easier to attach ecas to the productionRunProduce service for cost calculation.
Modified: trunk/applications/manufacturing/servicedef/services_production_run.xml
===================================================================
--- trunk/applications/manufacturing/servicedef/services_production_run.xml 2006-04-17 16:59:55 UTC (rev 7316)
+++ trunk/applications/manufacturing/servicedef/services_production_run.xml 2006-04-17 17:14:31 UTC (rev 7317)
@@ -143,7 +143,7 @@
<description>
Create Inventory for product produced by a Production Run.
</description>
- <attribute name="productionRunId" type="String" mode="IN" optional="false"/>
+ <attribute name="workEffortId" type="String" mode="IN" optional="false"/>
<attribute name="quantity" type="Double" mode="INOUT" optional="true"/>
<attribute name="createSerializedInventory" type="Boolean" mode="IN" optional="true"/>
<attribute name="lotId" type="String" mode="IN" optional="true"/>
Modified: trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
===================================================================
--- trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java 2006-04-17 16:59:55 UTC (rev 7316)
+++ trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java 2006-04-17 17:14:31 UTC (rev 7317)
@@ -1167,7 +1167,7 @@
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
// Mandatory input fields
- String productionRunId = (String)context.get("productionRunId");
+ String productionRunId = (String)context.get("workEffortId");
// Optional input fields
Double quantity = (Double)context.get("quantity");
@@ -2059,7 +2059,7 @@
if (statusId.equals("PRUN_CLOSED")) {
// Put in warehouse the products manufactured
serviceContext.clear();
- serviceContext.put("productionRunId", productionRunId);
+ serviceContext.put("workEffortId", productionRunId);
serviceContext.put("userLogin", userLogin);
resultService = dispatcher.runSync("productionRunProduce", serviceContext);
serviceContext.clear();
Modified: trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
===================================================================
--- trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh 2006-04-17 16:59:55 UTC (rev 7316)
+++ trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh 2006-04-17 17:14:31 UTC (rev 7317)
@@ -42,6 +42,9 @@
HashMap productionRunData= new HashMap();
productionRunId = request.getParameter("productionRunId");
+if (UtilValidate.isEmpty(productionRunId)) {
+ productionRunId = request.getParameter("workEffortId");
+}
if (!UtilValidate.isEmpty(productionRunId)) {
ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher);
if (productionRun.exist()){
@@ -98,7 +101,7 @@
updateProductionRunWrapper.setUseRequestParameters(false);
context.put("updateProductionRunWrapper",updateProductionRunWrapper);
- productionRunData.put("productionRunId",productionRunId);
+ productionRunData.put("workEffortId",productionRunId);
productionRunData.put("productId", productionRun.getProductProduced().getString("productId"));
productionRunData.put("productName",productionRun.getProductProduced().getString("internalName"));
Modified: trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
===================================================================
--- trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml 2006-04-17 16:59:55 UTC (rev 7316)
+++ trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml 2006-04-17 17:14:31 UTC (rev 7317)
@@ -220,7 +220,7 @@
<form name="ShowProductionRun" type="single"
target="productionRunProduce" title="" default-map-name="productionRunData"
default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
- <field name="productionRunId"><hidden/></field>
+ <field name="workEffortId"><hidden/></field>
<field name="productId" title="${uiLabelMap.ProductProductId}">
<display description="[${productionRunData.productId}]/${productionRunData.productName}"/>
</field>
Modified: trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ShowProductionRun.bsh
===================================================================
--- trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ShowProductionRun.bsh 2006-04-17 16:59:55 UTC (rev 7316)
+++ trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ShowProductionRun.bsh 2006-04-17 17:14:31 UTC (rev 7317)
@@ -38,6 +38,9 @@
delegator = request.getAttribute("delegator");
productionRunId = request.getParameter("productionRunId");
+if (UtilValidate.isEmpty(productionRunId)) {
+ productionRunId = request.getParameter("workEffortId");
+}
if (!UtilValidate.isEmpty(productionRunId)) {
GenericValue productionRun = delegator.findByPrimaryKey("WorkEffort", UtilMisc.toMap("workEffortId", productionRunId));
More information about the Svn
mailing list