svn commit: r1870362 - /ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1870362 - /ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java

Pawan Verma-2
Author: pawan
Date: Mon Nov 25 07:32:45 2019
New Revision: 1870362

URL: http://svn.apache.org/viewvc?rev=1870362&view=rev
Log:
Fixed: liniting issues introduced by commit at 1870212
(OFBIZ-10585)

Thanks: Mathieu Lirzin for report

Modified:
    ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java

Modified: ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1870362&r1=1870361&r2=1870362&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Mon Nov 25 07:32:45 2019
@@ -2567,10 +2567,11 @@ public class ProductionRunServices {
                 BigDecimal qtyToProduce = qtyRequired.min(mktgPackagesAvailable);
                 /*
                     Creating production run job for remaining quantity in created status
-                    This will handle cases like if production run job creates for partial quantities or in case of fully backordered scenario.
+                    This will handle cases like if production run job creates for partial quantities
+                    or in case of fully backordered scenario.
                  */
                 BigDecimal remainingQty = orderItem.getBigDecimal("quantity").subtract(qtyToProduce);
-                if(remainingQty.compareTo(ZERO) > 0) {
+                if (remainingQty.compareTo(ZERO) > 0) {
                     serviceContext.clear();
                     serviceContext.put("facilityId", facilityId);
                     serviceContext.put("userLogin", userLogin);
@@ -2581,11 +2582,16 @@ public class ProductionRunServices {
                     if (ServiceUtil.isError(resultService)) {
                         return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultService));
                     }
-                    String productionRunIdForRemainingQty = (String)resultService.get("productionRunId");
+                    String productionRunIdForRemainingQty = (String) resultService.get("productionRunId");
                     try {
-                        delegator.create("WorkOrderItemFulfillment", UtilMisc.toMap("workEffortId", productionRunIdForRemainingQty, "orderId", orderId, "orderItemSeqId", orderItemSeqId));
+                        delegator.create("WorkOrderItemFulfillment",
+                                UtilMisc.toMap("workEffortId", productionRunIdForRemainingQty, "orderId", orderId,
+                                        "orderItemSeqId", orderItemSeqId));
                     } catch (GenericEntityException e) {
-                        return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunForMarketingPackagesCreationError", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId, "errorString", e.getMessage()), locale));
+                        return ServiceUtil.returnError(UtilProperties.getMessage(resource,
+                                "ManufacturingProductionRunForMarketingPackagesCreationError",
+                                UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId,
+                                        "errorString", e.getMessage()), locale));
                     }
                 }