You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by pa...@apache.org on 2019/11/25 07:23:12 UTC
[ofbiz-framework] branch trunk updated: Fixed: liniting issues
introduced by commit d00208c (OFBIZ-10585)
This is an automated email from the ASF dual-hosted git repository.
pawan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new fc1e1b4 Fixed: liniting issues introduced by commit d00208c (OFBIZ-10585)
fc1e1b4 is described below
commit fc1e1b4858de6174b3fac7a32771e2a4ae3af1ec
Author: Pawan Verma <pa...@hotwaxsystems.com>
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 | 16 +++++++++++-----
1 file changed, 11 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 063612b..99bd77a 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
@@ -2802,10 +2802,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);
@@ -2816,11 +2817,16 @@ public class ProductionRunServices {
if (ServiceUtil.isError(serviceResult)) {
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(serviceResult));
}
- String productionRunIdForRemainingQty = (String)serviceResult.get("productionRunId");
+ String productionRunIdForRemainingQty = (String) serviceResult.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));
}
}