You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2008/11/16 20:42:52 UTC

svn commit: r718090 - in /ofbiz/branches/release4.0: ./ applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java

Author: jleroux
Date: Sun Nov 16 11:42:51 2008
New Revision: 718090

URL: http://svn.apache.org/viewvc?rev=718090&view=rev
Log:
Merged from trunk r618970

Modified:
    ofbiz/branches/release4.0/   (props changed)
    ofbiz/branches/release4.0/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java

Propchange: ofbiz/branches/release4.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Nov 16 11:42:51 2008
@@ -1 +1 @@
-/ofbiz/trunk:674173,676162,676227,676246,679704,705862,706035,706055,706067,706692
+/ofbiz/trunk:618970,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692

Modified: ofbiz/branches/release4.0/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=718090&r1=718089&r2=718090&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/branches/release4.0/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Sun Nov 16 11:42:51 2008
@@ -1454,22 +1454,19 @@
             } catch(Exception exc) {
                 return ServiceUtil.returnError(exc.getMessage());
             }
-            // Now the production run's quantityProduced is updated
-            double totalQuantity = quantityProduced.doubleValue() + quantity.doubleValue();
-            Map serviceContext = new HashMap();
-            serviceContext.clear();
-            serviceContext.put("workEffortId", productionRunId);
-            serviceContext.put("quantityProduced", new Double(totalQuantity));
-            serviceContext.put("actualCompletionDate", UtilDateTime.nowTimestamp());
-            serviceContext.put("userLogin", userLogin);
-            Map resultService = null;
-            try {
-                resultService = dispatcher.runSync("updateWorkEffort", serviceContext);
-            } catch (GenericServiceException e) {
-                Debug.logError(e, "Problem calling the updateWorkEffort service", module);
-                return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunStatusNotChanged", locale));
-            }
         }
+        // Now the production run's quantityProduced is updated
+        Map serviceContext = UtilMisc.toMap("workEffortId", productionRunId);
+        serviceContext.put("quantityProduced", new Double(quantityProduced.doubleValue() + quantity.doubleValue()));
+        serviceContext.put("actualCompletionDate", UtilDateTime.nowTimestamp());
+        serviceContext.put("userLogin", userLogin);
+        try {
+            Map resultService = dispatcher.runSync("updateWorkEffort", serviceContext);
+        } catch (GenericServiceException e) {
+            Debug.logError(e, "Problem calling the updateWorkEffort service", module);
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunStatusNotChanged", locale));
+        }
+
         result.put("quantity", quantity);
         return result;
     }