diff --git a/applications/manufacturing/config/ManufacturingUiLabels.xml b/applications/manufacturing/config/ManufacturingUiLabels.xml index 16959a33da..1845bd7dbc 100644 --- a/applications/manufacturing/config/ManufacturingUiLabels.xml +++ b/applications/manufacturing/config/ManufacturingUiLabels.xml @@ -1487,6 +1487,10 @@ จากวันที่ 开始日期 + + Generate Production Runs + Genera ordini di produzione + Zusammenfalten Implosion diff --git a/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml b/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml index 889a22b857..364d6c9892 100644 --- a/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml +++ b/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml @@ -20,7 +20,10 @@ under the License. - + diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy index 2fa847a6d6..b88f8b3faa 100644 --- a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy +++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy @@ -27,7 +27,7 @@ shipment = delegator.findByPrimaryKey("Shipment", [shipmentId : shipmentId]); context.shipmentIdPar = shipment.shipmentId; context.estimatedReadyDatePar = shipment.estimatedReadyDate; context.estimatedShipDatePar = shipment.estimatedShipDate; - +records = []; if (shipment) { shipmentPlans = delegator.findByAnd("OrderShipment", [shipmentId : shipmentId]); shipmentPlans.each { shipmentPlan -> @@ -50,11 +50,10 @@ if (shipment) { result = [:]; result = dispatcher.runSync("getNotAssembledComponents",inputPar); - if (result) + if (result) { components = (List)result.get("notAssembledComponents"); - componentsIt = components.iterator(); - while (componentsIt) { - oneComponent = (org.ofbiz.manufacturing.bom.BOMNode)componentsIt.next(); + } + components.each { oneComponent -> record = new HashMap(recordGroup); record.componentId = oneComponent.getProduct().productId; record.componentName = oneComponent.getProduct().internalName; @@ -66,11 +65,11 @@ if (shipment) { serviceInput = [productId : oneComponent.getProduct().productId , facilityId : facilityId]; serviceOutput = dispatcher.runSync("getInventoryAvailableByFacility",serviceInput); qha = serviceOutput.quantityOnHandTotal ?: 0.0; - inventoryStock.oneComponent.getProduct().productId = qha; + inventoryStock.put(oneComponent.getProduct().productId, qha); } qty = inventoryStock[oneComponent.getProduct().productId]; qty = qty - oneComponent.getQuantity(); - inventoryStock.oneComponent.getProduct().productId = qty; + inventoryStock.put(oneComponent.getProduct().productId, qty); } record.componentOnHand = qty; // Now we get the products qty already reserved by production runs diff --git a/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl b/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl index d20ddba5b6..d65e6cd023 100644 --- a/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl +++ b/applications/manufacturing/webapp/manufacturing/reports/ShipmentPlanStockReport.fo.ftl @@ -40,25 +40,11 @@ under the License. ${uiLabelMap.ManufacturingComponentsOfShipmentPlan} - - - - - - - - ${uiLabelMap.ManufacturingShipmentId}: ${shipmentIdPar} - - - ${uiLabelMap.ManufacturingEstimatedCompletionDate}: <#if estimatedReadyDatePar?has_content>${estimatedReadyDatePar} - - - ${uiLabelMap.ManufacturingEstimatedShipDate}: <#if estimatedShipDatePar?has_content>${estimatedShipDatePar} - - - - - + + ${uiLabelMap.ManufacturingShipmentId}: ${shipmentIdPar} + ${uiLabelMap.ManufacturingEstimatedCompletionDate}: <#if estimatedReadyDatePar?has_content>${estimatedReadyDatePar} + ${uiLabelMap.ManufacturingEstimatedShipDate}: <#if estimatedShipDatePar?has_content>${estimatedShipDatePar} + @@ -81,21 +67,12 @@ under the License. ${uiLabelMap.ManufacturingNeedQuantity} - ${uiLabelMap.ManufacturingOnHandQuantity} + ${uiLabelMap.ProductQoh} - - - <#list records as record> - - - - - - - - + + <#list records as record> @@ -146,9 +123,9 @@ under the License. - - - + + + <#else> diff --git a/applications/manufacturing/widget/manufacturing/JobshopScreens.xml b/applications/manufacturing/widget/manufacturing/JobshopScreens.xml index b77185b43a..bcf47b36d2 100644 --- a/applications/manufacturing/widget/manufacturing/JobshopScreens.xml +++ b/applications/manufacturing/widget/manufacturing/JobshopScreens.xml @@ -577,7 +577,7 @@ under the License. - +