[ofbiz-framework] branch release17.12 updated: Fixed: liniting issues introduced by commit d00208c (OFBIZ-10585)

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

[ofbiz-framework] branch release17.12 updated: Fixed: liniting issues introduced by commit d00208c (OFBIZ-10585)

Pawan Verma-2
This is an automated email from the ASF dual-hosted git repository.

pawan pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release17.12 by this push:
     new 3d05f5a  Fixed: liniting issues introduced by commit d00208c (OFBIZ-10585)
3d05f5a is described below

commit 3d05f5ae289273479fa9f07bac2b883276b2fdff
Author: Pawan Verma <[hidden email]>
AuthorDate: Mon Nov 25 12:52:44 2019 +0530

    Fixed: liniting issues introduced by commit d00208c
    (OFBIZ-10585)
   
    Thanks: Mathieu Lirzin for report
---
 .../manufacturing/jobshopmgt/ProductionRunServices.java | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
index c3595bd..0e5d1b9 100644
--- a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
+++ b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
@@ -2579,10 +2579,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);
@@ -2593,11 +2594,17 @@ 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));
                     }
                 }