diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy index a7c9cb24c2..dc05f84607 100644 --- a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy +++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy @@ -17,6 +17,7 @@ * under the License. */ +import org.ofbiz.manufacturing.jobshopmgt.ProductionRun; // ************************************** // ShipmentPlan list form @@ -144,18 +145,22 @@ if (shipmentPlans) { widthUom.abbreviation + "x" + depthUom.abbreviation; } + rows.add(oneRow); // Select the production runs, if available productionRuns = delegator.findByAnd("WorkOrderItemFulfillment", [orderId : shipmentPlan.orderId , orderItemSeqId : shipmentPlan.orderItemSeqId],["workEffortId"]); // TODO: add shipmentId if (productionRuns) { workInProgress = "true"; productionRunsId = ""; productionRuns.each { productionRun -> - productionRunsId = productionRun.workEffortId + " " + productionRunsId; + productionRunRow = new HashMap(); + productionRunRow.put("productionRunId", productionRun.workEffortId); + ProductionRun productionRunWrapper = new ProductionRun(productionRun.workEffortId, delegator, dispatcher); + productionRunRow.put("productionRunEstimatedCompletionDate", productionRunWrapper.getEstimatedCompletionDate()); + productionRunRow.put("productionRunStatusId", productionRunWrapper.getGenericValue().currentStatusId); + productionRunRow.put("productionRunQuantityProduced", productionRunWrapper.getGenericValue().quantityProduced); + rows.add(productionRunRow); } - oneRow.productionRuns = productionRunsId; } - - rows.add(oneRow); } context.workInProgress = workInProgress; context.shipmentPlan = rows; diff --git a/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml b/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml index f91c7cdc60..59b2260757 100644 --- a/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml +++ b/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml @@ -738,7 +738,11 @@ under the License.