diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy index 7e2b04e225..4334703f93 100644 --- a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy +++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy @@ -23,7 +23,7 @@ import org.ofbiz.entity.util.EntityUtil; productionRunId = parameters.productionRunId ?: parameters.workEffortId; context.productionRunId = productionRunId; -delivGoodStandard = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunId, workEffortGoodStdTypeId : "PRUN_PROD_DELIV"], ["-fromDate"]))); +delivGoodStandard = EntityUtil.getFirst(delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunId, workEffortGoodStdTypeId : "PRUN_PROD_DELIV", statusId : "WEGS_CREATED"], ["-fromDate"])); if (delivGoodStandard) { context.delivProductId = delivGoodStandard.productId; } diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy index 6cbda9f792..6c511bc809 100644 --- a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy +++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy @@ -222,6 +222,9 @@ if (productionRunId) { } } } + // Content + productionRunContents = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortContentAndInfo", [workEffortId : productionRunId], ["-fromDate"])); + context.productionRunContents = productionRunContents; context.productionRunComponentsData = productionRunComponentsData; context.productionRunComponentsDataReadyForIssuance = productionRunComponentsDataReadyForIssuance; context.productionRunComponentsAlreadyIssued = productionRunComponentsAlreadyIssued; diff --git a/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl b/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl index 69ea46ae27..cc60acacab 100644 --- a/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl +++ b/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl @@ -74,13 +74,13 @@ under the License. - title="${uiLabelMap.ManufacturingStartDate}": + ${uiLabelMap.ManufacturingStartDate}: <#if productionRunData.estimatedStartDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.estimatedStartDate, "dd/MM/yyyy")} - ${uiLabelMap.FormFieldTitle_actualStartDate}: + ${uiLabelMap.CommonStartDate}: <#if productionRunData.actualStartDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.actualStartDate, "dd/MM/yyyy")} @@ -94,7 +94,7 @@ under the License. <#if productionRunData.estimatedCompletionDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.estimatedCompletionDate, "dd/MM/yyyy")} - ${uiLabelMap.FormFieldTitle_actualCompletionDate}: + ${uiLabelMap.ManufacturingActualCompletionDate}: <#if productionRunData.actualCompletionDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.actualCompletionDate, "dd/MM/yyyy")} @@ -184,7 +184,7 @@ under the License. - ${uiLabelMap.FormFieldTitle_fixedAssetId} + ${uiLabelMap.FixedAsset} ${uiLabelMap.ManufacturingRoutingTask} ${uiLabelMap.CommonDescription} ${uiLabelMap.ManufacturingTaskEstimatedSetupMillis} @@ -214,6 +214,33 @@ under the License. + + <#if productionRunContents?has_content> + + + + + + + Documents + Link + + + + <#assign rowColor = "white"> + <#list productionRunContents as productionRunContent> + + + ${productionRunContent.contentName?if_exists} + + + ${uiLabelMap.CommonView} + + + + + + diff --git a/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml b/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml index 87ffc6a173..709528e846 100644 --- a/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml +++ b/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml @@ -531,9 +531,7 @@ under the License.
- - - +