Author: jacopoc
Date: Sun Oct 15 03:51:31 2006 New Revision: 464154 URL: http://svn.apache.org/viewvc?view=rev&rev=464154 Log: New screens and services to set up multi fixed assests for routing tasks and production run tasks. Thanks to Ricardo Chavez for contributing this patch (OFBIZ-343 with some minor mods I did while reviewing). Modified: incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels_es.properties incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskForms.xml incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskTabBar.ftl incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml Modified: incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties (original) +++ incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties Sun Oct 15 03:51:31 2006 @@ -19,6 +19,7 @@ # ManufacturingActualCosts=Actual Costs ManufacturingAddExistingRoutingTask=Add a existing RoutingTask +ManufacturingAddProductionRunFixedAssetAssign=Assign Fixed Asset ManufacturingAddProductionRunProductComponent=Add ProductComponent to ProductionRun ManufacturingAddRoutingTask=Add a RoutingTask ManufacturingAnyMachineGroup=Any Fixed Asset Group @@ -53,9 +54,11 @@ ManufacturingCreateCalendar=Create calendar ManufacturingCreateCalendarWeek=Create Calendar Week ManufacturingCreateMachineGroup=Create a Fixed Asset group +ManufacturingCreatePermissionError=Security Error: to run this operation you must have the MANUFACTURING_CREATE or MANUFACTURING_ADMIN permission ManufacturingCreateProductionRun=Create a Production Run ManufacturingCuttingList=Cutting List ManufacturingCuttingListReport=Cutting List Report +ManufacturingDeletePermissionError=Security Error: to run this operation you must have the MANUFACTURING_DELETE or MANUFACTURING_ADMIN permission ManufacturingDeliveryDate=Delivery date ManufacturingDependentWorkEfforts=Dependent Production Runs ManufacturingEditCalendarExceptionDayFor=Edit Calendar Exception day for @@ -84,7 +87,11 @@ ManufacturingFindProductionRun=Find Production Run ManufacturingFindRoutingTasks=Find Routing Tasks ManufacturingFindRouting=Find Routing +ManufacturingFixedAssetAllocatedCostNotCorrect=The Allocated Cost field is not formatted correctly +ManufacturingFixedAssetFromDateMissing=The From date is missing +ManufacturingFixedAssetFromDateNotCorrect=The From Date field is not formatted correctly ManufacturingFixedAssetNotExist=FixedAsset does not exist +ManufacturingFixedAssetThruDateNotCorrect=The Thru Date field is not formatted correctly ManufacturingFormula=Formula ManufacturingImplosion=Implosion ManufacturingInstruction=Instruction @@ -98,6 +105,7 @@ ManufacturingListCalendarWeek=List of weeks ManufacturingListingBomError=Error while listing the Bill of Material ManufacturingListOfProductionRunComponents=List Of ProductionRun Components +ManufacturingListOfProductionRunFixedAssets=List Of ProductionRun FixedAssets ManufacturingListOfProductionRunRoutingTasks=List Of ProductionRun RoutingTasks ManufacturingListProducts=Deliverable Products ManufacturingListRoutings=List Routings @@ -140,6 +148,8 @@ ManufacturingProductionRunCosts=Production Run Costs ManufacturingProductionRunCreated=ProductionRun ${productionRunId} created ManufacturingProductionRunDeclaration=Production Run Declaration +ManufacturingProductionRunFixedAssetAssign=Fixed Asset Assign +ManufacturingProductionRunFixedAssetIdMissing=Fixed Asset Id is missing ManufacturingProductionRunId=Production Run ID ManufacturingProductionRunName=ProductionRun Name ManufacturingProductionRunNotUpdated=ProductionRun update failed see log for more information @@ -173,6 +183,7 @@ ManufacturingRoutingTasks=Routing Tasks ManufacturingRoutingTaskAssocCreateSuccessfully=Routing Task association creation successfull ManufacturingRoutingTaskCopiedSuccessfully=Routing Task copied Successfully +ManufacturingRoutingTaskFixedAssets=Fixed Assets ManufacturingRoutingTaskId=Routing Task Id ManufacturingRoutingTaskToMissing=Routing Task To is Missing ManufacturingRunMrp=Run MRP @@ -197,10 +208,13 @@ ManufacturingUpdateCalendar=Update Calendar ManufacturingUpdateCalendarWeek=Update Week ManufacturingUpdateMachineGroup=Update Fixed Asset Group +ManufacturingUpdatePermissionError=Security Error: to run this operation you must have the MANUFACTURING_UPDATE or MANUFACTURING_ADMIN permission ManufacturingViewPermissionError=You do not have permission to view this page. ("MANUFACTURING_VIEW" or "MANUFACTURING_ADMIN" needed) ManufacturingVisitType=Tree visit Algorithm ManufacturingWorkEffortNotExist=WorkEffort does not exist ManufacturingWorkEffortAssocNotExist=WorkEffortAssoc does not exist +ManufacturingWorkEffortFixedAssetAsgAlreadyExist=The selected fixed asset is already associated with this production run task +ManufacturingWorkEffortFixedAssetStdAlreadyExist=The selected fixed asset type is already associated with this routing task ManufacturingWorkEffortGoodStandardNotExist=WorkEffortGoodStandard table does not exist ManufacturingWorkEffortIdFromNotExist=workEffortIdFrom does not exist @@ -257,6 +271,7 @@ PageTitleEditRoutingProductLink=Edit Routing-Product Link PageTitleEditRoutingTask=Edit Routing Task PageTitleEditRoutingTaskAssoc=Edit Routing Task Association +PageTitleEditRoutingTaskFixedAsset=Edit Routing Task-Fixed Asset Association PageTitleEditRoutingTaskCosts=Edit Routing Task Costs PageTitleEditRoutingTaskProduct=Edit Routing Task Product PageTitleFieldLookup=Field lookup Modified: incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels_es.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels_es.properties?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels_es.properties (original) +++ incubator/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels_es.properties Sun Oct 15 03:51:31 2006 @@ -24,6 +24,7 @@ ManufacturingActualStartDateTime=Fecha/Hora de Inicio Real #ManufacturingAddExistingRoutingTask = A\u00F1adir una ruta existente ManufacturingAddExistingRoutingTask=A\u00F1adir un proceso existente +ManufacturingAddProductionRunFixedAssetAssign=Asignar activo fijo ManufacturingAddProductionRunProductComponent=A\u00F1adir componente ManufacturingAddQuantityProduced=A\u00F1adir Cant. Producida ManufacturingAddQuantityRejected=A\u00F1adir Cantidad rechazada @@ -66,8 +67,10 @@ ManufacturingCreateCalendar=Crear calendario ManufacturingCreateCalendarWeek=Crear semana ManufacturingCreateMachineGroup=Crear grupo de m\u00E1quinas +ManufacturingCreatePermissionError=Error de seguridad: para ejecutar esta operaci\u00F3n se requiere tener los permisos MANUFACTURING_CREATE o MANUFACTURING_ADMIN ManufacturingCreateProductionRun=Crear orden de producci\u00F3n ManufacturingDeclareProductionRunTask=Declarar +ManufacturingDeletePermissionError=Error de seguridad: para ejecutar esta operaci\u00F3n se requiere tener los permisos MANUFACTURING_DELETE o MANUFACTURING_ADMIN ManufacturingDependentWorkEfforts=Corridas de producci\u00F3n dependientes ManufacturingDuplicatedComponentInBOM=La siguiente asociaci\u00F3n causa recursi\u00F3n: {0} --> {1} ManufacturingEditCalendarExceptionDayFor=Editar excepci\u00F3n de calendario @@ -102,7 +105,11 @@ ManufacturingFindRouting=Buscar ruta #ManufacturingFindRoutingTasks = Buscar tareas ManufacturingFindRoutingTasks=Buscar procesos +ManufacturingFixedAssetAllocatedCostNotCorrect=El campo Allocated Cost no tiene el formato correcto +ManufacturingFixedAssetFromDateMissing=Debe indicar la fecha de inicio +ManufacturingFixedAssetFromDateNotCorrect=La fecha de inicio no tiene el formato correcto ManufacturingFixedAssetNotExist=Activo fijo no existe +ManufacturingFixedAssetThruDateNotCorrect=La fecha de fin no tiene el formato correcto ManufacturingFromDate=Fecha de inicio ManufacturingImplosion=Implosi\u00F3n ManufacturingInstruction=Instrucci\u00F3n @@ -120,6 +127,7 @@ ManufacturingListCalendarWeek=Lista de semanas ManufacturingListCostComponentCalc=Lista de calculo de componentes ManufacturingListOfProductionRunComponents=Lista de componentes de la corrida de produci\u00F3n +ManufacturingListOfProductionRunFixedAssets=Lista de activos fijos de la corrida de producci\u00F3n ManufacturingListOfProductionRunRoutingTasks=Lista de tareas de la corrida de producci\u00F3n ManufacturingListProducts=Productos Entregables ManufacturingListRoutings=Lista de Rutas @@ -167,6 +175,8 @@ ManufacturingProductionRunClose=Cerrar corrida de producci\u00F3n ManufacturingProductionRunCreated=Orden de producci\u00F3n ${productionRunId} creada ManufacturingProductionRunDeclaration=Declaraci\u00F3n de orden de producci\u00F3n +ManufacturingProductionRunFixedAssetAssign=Asignaci\u00F3n de activo fijo +ManufacturingProductionRunFixedAssetIdMissing=Debe indicar el activo fijo a asignar ManufacturingProductionRunId=C\u00F3digo de orden de producci\u00F3n ManufacturingProductionRunName=Nombre de orden de producci\u00F3n ManufacturingProductionRunNotUpdated=No se actualiz\u00F3 la orden de producci\u00F3n. Consulte los logs para m\u00E1s detalle. @@ -203,6 +213,7 @@ #ManufacturingRoutingTaskCopiedSuccessfully = Tarea copiada exitosamente ManufacturingRoutingTaskCopiedSuccessfully=Proceso copiado exitosamente ManufacturingRoutingTaskCosts=Costo de la tarea +ManufacturingRoutingTaskFixedAssets=Activos fijos #ManufacturingRoutingTaskId = C\u00F3digo de tarea ManufacturingRoutingTaskId=C\u00F3digo de proceso ManufacturingRoutingTaskToMissing=La Tarea no se encuentra @@ -235,9 +246,12 @@ ManufacturingUpdateCalendar=Actualizar calendario ManufacturingUpdateCalendarWeek=Actualizar semana ManufacturingUpdateMachineGroup=Actualizar grupo de m\u00E1quinas +ManufacturingUpdatePermissionError=Error de seguridad: para ejecutar esta operaci\u00F3n se requiere tener los permisos MANUFACTURING_UPDATE o MANUFACTURING_ADMIN ManufacturingViewPermissionError=No tiene permiso para ver esta p\u00E1gina. Necesita los permisos "MANUFACTURING_VIEW" o "MANUFACTURING_ADMIN" ManufacturingVisitType=Algoritmo de b\u00FAsqueda ManufacturingWorkEffortAssocNotExist=La asociaci\u00F3n no existe +ManufacturingWorkEffortFixedAssetAsgAlreadyExist=El activo fijo seleccionado ya est\u00E1 asociado a esta tarea +ManufacturingWorkEffortFixedAssetStdAlreadyExist=El tipo de activo fijo seleccionado ya est\u00E1 asociado a esta tarea ManufacturingWorkEffortGoodStandardNotExist=La tabla no existe ManufacturingWorkEffortIdFromNotExist=El esfuerzo origen no existe ManufacturingWorkEffortNotExist=El esfuerzo no existe @@ -253,6 +267,7 @@ PageTitleEditRoutingProductLink=Editar asociaci\u00F3n con producto #PageTitleEditRoutingTaskAssoc = Editar con tarea PageTitleEditRoutingTaskAssoc=Editar con proceso +PageTitleEditRoutingTaskFixedAsset=Editar asociaci\u00F3n tarea de ruta-activo fijo PageTitleFieldLookup=Campo de b\u00FAsqueda PageTitleFindCalendar=Buscar calendario PageTitleFindInventoryEventPlan=Buscar plan de stock Modified: incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Sun Oct 15 03:51:31 2006 @@ -294,6 +294,56 @@ </else> </if> </simple-method> - + <simple-method method-name="createWorkEffortFixedAssetAssign" + short-description="Create a WorkEffort FixedAsset Assign"> + <check-permission permission="MANUFACTURING" action="_CREATE"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingCreatePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> + <if-not-empty field-name="lookedUpValue"> + <add-error> + <fail-property resource="ManufacturingUiLabels" + property="ManufacturingWorkEffortFixedAssetAsgAlreadyExist"/> + </add-error> + <else> + <make-value entity-name="WorkEffortFixedAssetAssign" value-name="newWEFixedAssetAssign" /> + <set-pk-fields map-name="parameters" value-name="newWEFixedAssetAssign" /> + <set-nonpk-fields map-name="parameters" value-name="newWEFixedAssetAssign" /> + <!-- if the user hasn't specified a fromDate, set it from the actual start date of the task + if there is no actual start date, default to now (to the current date and time) --> + <if-empty map-name="parameters" field-name="fromDate"> + <entity-one entity-name="WorkEffort" value-name="prodRunTask" /> + <if-not-empty map-name="prodRunTask" field-name="actualStartDate"> + <set field="newWEFixedAssetAssign.fromDate" from-field="prodRunTask.actualStartDate" /> + <else> + <now-timestamp-to-env env-name="newWEFixedAssetAssign.fromDate"/> + </else> + </if-not-empty> + </if-empty> + <create-value value-name="newWEFixedAssetAssign" /> + </else> + </if-not-empty> + </simple-method> + <simple-method method-name="updateWorkEffortFixedAssetAssign" + short-description="Update an existing WorkEffort FixedAsset Assign"> + <check-permission permission="MANUFACTURING" action="_UPDATE"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingUpdatePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> + <set-nonpk-fields map-name="parameters" value-name="lookedUpValue" /> + <store-value value-name="lookedUpValue" /> + </simple-method> + <simple-method method-name="removeWorkEffortFixedAssetAssign" + short-description="Remove a WorkEffort FixedAsset Assign"> + <check-permission permission="MANUFACTURING" action="_DELETE"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingDeletePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> + <remove-value value-name="lookedUpValue" /> + </simple-method> + </simple-methods> Modified: incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml Sun Oct 15 03:51:31 2006 @@ -302,7 +302,146 @@ </call-service> <log level="info" message="parameters = ${parameters}"/> </if-compare> + + <if-compare value="addFixedAsset" field-name="actionForm" map-name="parameters" operator="equals"> + <call-map-processor in-map-name="parameters" out-map-name="context"> + <simple-map-processor name="prepareAddFixedAsset"> + <process field="workEffortId"> + <copy /> + <not-empty> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingRoutingTaskIdMissing" /> + </not-empty> + </process> + <process field="fixedAssetId"> + <copy /> + <not-empty> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingProductionRunFixedAssetIdMissing" /> + </not-empty> + </process> + <process field="fromDate"> + <copy /> + <not-empty> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetFromDateMissing" /> + </not-empty> + <convert type="Timestamp"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetFromDateNotCorrect"/> + </convert> + </process> + <process field="statusId"> + <copy /> + </process> + <process field="thruDate"> + <copy /> + <convert type="Timestamp"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetThruDateNotCorrect" /> + </convert> + </process> + <process field="allocatedCost"> + <copy /> + <convert type="Double"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetAllocatedCostNotCorrect" /> + </convert> + </process> + <process field="comments"> + <copy /> + </process> + </simple-map-processor> + </call-map-processor> + <check-errors /> + <call-service service-name="createWorkEffortFixedAssetAssign" in-map-name="context" /> + </if-compare> + + <if-compare value="updateFixedAsset" field-name="actionForm" map-name="parameters" operator="equals"> + <call-map-processor in-map-name="parameters" out-map-name="context"> + <simple-map-processor name="prepareUpdateFixedAsset"> + <process field="workEffortId"> + <copy /> + <not-empty> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingRoutingTaskIdMissing" /> + </not-empty> + </process> + <process field="fixedAssetId"> + <copy /> + <not-empty> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingProductionRunFixedAssetIdMissing" /> + </not-empty> + </process> + <process field="fromDate"> + <copy /> + <not-empty> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetFromDateMissing" /> + </not-empty> + <convert type="Timestamp"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetFromDateNotCorrect"/> + </convert> + </process> + <process field="statusId"> + <copy /> + </process> + <process field="thruDate"> + <copy /> + <convert type="Timestamp"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetThruDateNotCorrect" /> + </convert> + </process> + <process field="allocatedCost"> + <copy /> + <convert type="Double"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetAllocatedCostNotCorrect" /> + </convert> + </process> + <process field="comments"> + <copy /> + </process> + </simple-map-processor> + </call-map-processor> + <check-errors /> + <call-service service-name="updateWorkEffortFixedAssetAssign" in-map-name="context" /> + </if-compare> + </simple-method> + <!-- This method calls the removeWorkEffortFixedAssetAssign service and returns a response according to the + production run status, so that we can show the appropriate screen (EditProductionRun or + ProductionRunDeclaration) --> + <simple-method method-name="removeProductionRunFixedAsset" + short-description="Deletes a WorkEffortFixedAssetAssign and direct to the appropiate screen"> + <call-map-processor in-map-name="parameters" out-map-name="context"> + <simple-map-processor name="prepareRemoveFixedAsset"> + <process field="workEffortId"> + <copy /> + <not-empty> + <fail-property property="ManufacturingRoutingTaskIdMissing" resource="ManufacturingUiLabels"/> + </not-empty> + </process> + <process field="fixedAssetId"> + <copy /> + <not-empty> + <fail-property property="ManufacturingProductionRunFixedAssetIdMissing" resource="ManufacturingUiLabels"/> + </not-empty> + </process> + <process field="fromDate"> + <copy /> + <not-empty> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetStartDateMissing" /> + </not-empty> + <convert type="Timestamp"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingFixedAssetFromDateNotCorrect"/> + </convert> + </process> + </simple-map-processor> + </call-map-processor> + <check-errors /> + <call-service service-name="removeWorkEffortFixedAssetAssign" in-map-name="context" /> + <check-errors /> + <entity-one entity-name="WorkEffort" value-name="productionRun" auto-field-map="false"> + <field-map field-name="workEffortId" env-name="parameters.productionRunId" /> + </entity-one> + <if-compare value="PRUN_CREATED" field-name="currentStatusId" map-name="productionRun" operator="equals"> + <return response-code="docs_not_printed" /> + <else> + <return response-code="docs_printed" /> + </else> + </if-compare> </simple-method> </simple-methods> Modified: incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml Sun Oct 15 03:51:31 2006 @@ -224,5 +224,46 @@ <remove-value value-name="lookedUpValue"/> </if-not-empty> </simple-method> + + <simple-method method-name="createWorkEffortFixedAssetStd" + short-description="Create a WorkEffort FixedAsset Standard"> + <check-permission permission="MANUFACTURING" action="_CREATE"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingCreatePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> + <if-not-empty field-name="lookedUpValue"> + <add-error> + <fail-property resource="ManufacturingUiLabels" + property="ManufacturingWorkEffortFixedAssetAlreadyExist"/> + </add-error> + <check-errors /> + <else> + <make-value entity-name="WorkEffortFixedAssetStd" value-name="newWEFixedAssetStd" /> + <set-pk-fields map-name="parameters" value-name="newWEFixedAssetStd" /> + <set-nonpk-fields map-name="parameters" value-name="newWEFixedAssetStd" /> + <create-value value-name="newWEFixedAssetStd" /> + </else> + </if-not-empty> + </simple-method> + <simple-method method-name="updateWorkEffortFixedAssetStd" + short-description="Update an existing WorkEffort FixedAsset Standard"> + <check-permission permission="MANUFACTURING" action="_UPDATE"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingUpdatePermissionERror"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> + <set-nonpk-fields map-name="parameters" value-name="lookedUpValue" /> + <store-value value-name="lookedUpValue" /> + </simple-method> + <simple-method method-name="removeWorkEffortFixedAssetStd" + short-description="Delete a WorkEffort FixedAsset Standard"> + <check-permission permission="MANUFACTURING" action="_DELETE"> + <fail-property resource="ManufacturingUiLabels" property="ManufacturingDeletePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> + <remove-value value-name="lookedUpValue" /> + </simple-method> </simple-methods> Modified: incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml Sun Oct 15 03:51:31 2006 @@ -300,4 +300,30 @@ <attribute mode="IN" name="workEffortId" optional="false" type="String"/> <attribute mode="OUT" name="totalCost" optional="false" type="BigDecimal"/> </service> + <service name="createWorkEffortFixedAssetAssign" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetAssign" + location="org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" + invoke="createWorkEffortFixedAssetAssign"> + <description>Create a WorkEffortFixedAssetAssign entry to associate a fixed asset + with a production run task</description> + <auto-attributes include="pk" mode="IN" optional="false" /> + <auto-attributes include="nonpk" mode="IN" optional="true" /> + <override name="fromDate" optional="true" /> + </service> + <service name="updateWorkEffortFixedAssetAssign" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetAssign" + location="org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" + invoke="updateWorkEffortFixedAssetAssign"> + <description>Update an existing WorkEffortFixedAssetAssign entry</description> + <auto-attributes include="pk" mode="IN" optional="false" /> + <auto-attributes include="nonpk" mode="IN" optional="true" /> + </service> + <service name="removeWorkEffortFixedAssetAssign" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetAssign" + location="org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" + invoke="removeWorkEffortFixedAssetAssign"> + <description>Remove a WorkEffortFixedAssign entry, which removes the association between a fixed asset + and a production run task</description> + <auto-attributes include="pk" mode="IN" optional="false" /> + </service> </services> Modified: incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml Sun Oct 15 03:51:31 2006 @@ -58,4 +58,29 @@ <attribute mode="OUT" name="setupTime" type="Double" optional="true"/> <attribute mode="OUT" name="taskUnitTime" type="Double" optional="true"/> </service> + <service name="createWorkEffortFixedAssetStd" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetStd" + location="org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml" + invoke="createWorkEffortFixedAssetStd"> + <description>Creates a WorkEffortFixedAssetStd entry to associate a routing task + with a fixed asset (type)</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="updateWorkEffortFixedAssetStd" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetStd" + location="org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml" + invoke="updateWorkEffortFixedAssetStd"> + <description>Updates an existing WorkEffortFixedAssetStd entry</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="removeWorkEffortFixedAssetStd" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetStd" + location="org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml" + invoke="removeWorkEffortFixedAssetStd"> + <description>Removes a WorkEffortFixedAssetStd, thus removing the association between a routing task + and a fixed asset (type)</description> + <auto-attributes include="pk" mode="IN" optional="false" /> + </service> </services> Modified: incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh (original) +++ incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh Sun Oct 15 03:51:31 2006 @@ -193,6 +193,51 @@ ListProductionRunComponentsWrapper.putInContext("productionRunId", productionRunId); ListProductionRunComponentsWrapper.putInContext("productionRunComponentsData", productionRunComponentsData); context.put("ListProductionRunComponentsWrapper",ListProductionRunComponentsWrapper); + + //------------------------ + // Machines (fixed assets) + //------------------------ + // Fixed asset add sub-screen + if (actionForm.equals("AddFixedAsset")) { + Map fixedAssetData = UtilMisc.toMap("productionRunId", productionRunId); + HtmlFormWrapper editProdRunFixedAssetWrapper = new HtmlFormWrapper("/jobshopmgt/ProductionRunForms.xml", "EditProductionRunTaskFixedAsset", request, response); + editProdRunFixedAssetWrapper.putInContext("fixedAssetData", fixedAssetData); + editProdRunFixedAssetWrapper.putInContext("actionForm", "addFixedAsset"); + editProdRunFixedAssetWrapper.putInContext("actionIsAdd", "Y"); + // the declarationScreen variable tells us whether we are in the EditProductionRun screen + // or in the ProductionRunDeclaration screen + editProdRunFixedAssetWrapper.putInContext("declarationScreen", "N"); + context.put("editProdRunFixedAssetWrapper", editProdRunFixedAssetWrapper); + } + // Fixed asset update sub-screen + workEffortId = request.getParameter("workEffortId"); + fixedAssetId = request.getParameter("fixedAssetId"); + fromDate = request.getParameter("fromDate"); + if (workEffortId != null && fixedAssetId != null && fromDate!= null && actionForm.equals("UpdateFixedAsset")) { + GenericValue fixedAsset = delegator.findByPrimaryKey("WorkEffortFixedAssetAssign", + UtilMisc.toMap("workEffortId", workEffortId, "fixedAssetId", fixedAssetId, "fromDate", fromDate)); + Map fixedAssetData = fixedAsset.getAllFields(); + fixedAssetData.put("productionRunId", productionRunId); + HtmlFormWrapper editProdRunFixedAssetWrapper = new HtmlFormWrapper("/jobshopmgt/ProductionRunForms.xml", "EditProductionRunTaskFixedAsset", request, response); + editProdRunFixedAssetWrapper.putInContext("fixedAssetData", fixedAssetData); + editProdRunFixedAssetWrapper.putInContext("actionForm", "updateFixedAsset"); + editProdRunFixedAssetWrapper.putInContext("actionIsAdd", "null"); + editProdRunFixedAssetWrapper.putInContext("declarationScreen", "N"); + context.put("editProdRunFixedAssetWrapper", editProdRunFixedAssetWrapper); + context.put("fixedAssetId", fixedAssetId); + } + // Fixed assets list + List productionRunFixedAssetsData = new LinkedList(); + for (Iterator tasksIt = productionRunRoutingTasks.iterator(); tasksIt.hasNext();) { + GenericValue prodRunTask = (GenericValue)tasksIt.next(); + List taskFixedAssets = prodRunTask.getRelated("WorkEffortFixedAssetAssign"); + productionRunFixedAssetsData.addAll(taskFixedAssets); + } + HtmlFormWrapper ListProductionRunFixedAssetsWrapper = new HtmlFormWrapper("/jobshopmgt/ProductionRunForms.xml", "ListProductionRunTaskFixedAssets", request, response); + ListProductionRunFixedAssetsWrapper.putInContext("productionRunId", productionRunId); + ListProductionRunFixedAssetsWrapper.putInContext("productionRunFixedAssetsData", productionRunFixedAssetsData); + ListProductionRunFixedAssetsWrapper.putInContext("declarationScreen", "N"); + context.put("ListProductionRunFixedAssetsWrapper", ListProductionRunFixedAssetsWrapper); } } Modified: incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh (original) +++ incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh Sun Oct 15 03:51:31 2006 @@ -266,6 +266,49 @@ ListProductionRunComponentsWrapper.putInContext("productionRunComponentsData", productionRunComponentsData); context.put("ListProductionRunComponentsWrapper",ListProductionRunComponentsWrapper); context.put("productionRunComponentsData", productionRunComponentsData); + + //------------------------ + // Machines (fixed assets) + //------------------------ + // Fixed asset add sub-screen + if (actionForm.equals("AddFixedAsset")) { + Map fixedAssetData = UtilMisc.toMap("productionRunId", productionRunId); + HtmlFormWrapper editProdRunFixedAssetWrapper = new HtmlFormWrapper("/jobshopmgt/ProductionRunForms.xml", "EditProductionRunTaskFixedAsset", request, response); + editProdRunFixedAssetWrapper.putInContext("fixedAssetData", fixedAssetData); + editProdRunFixedAssetWrapper.putInContext("actionForm", "addFixedAsset"); + editProdRunFixedAssetWrapper.putInContext("actionIsAdd", "Y"); + editProdRunFixedAssetWrapper.putInContext("declarationScreen", "Y"); + context.put("editProdRunFixedAssetWrapper", editProdRunFixedAssetWrapper); + } + // Fixed asset update sub-screen + workEffortId = request.getParameter("workEffortId"); + fixedAssetId = request.getParameter("fixedAssetId"); + fromDate = request.getParameter("fromDate"); + if (workEffortId != null && fixedAssetId != null && fromDate!= null && actionForm.equals("UpdateFixedAsset")) { + GenericValue fixedAsset = delegator.findByPrimaryKey("WorkEffortFixedAssetAssign", + UtilMisc.toMap("workEffortId", workEffortId, "fixedAssetId", fixedAssetId, "fromDate", fromDate)); + Map fixedAssetData = fixedAsset.getAllFields(); + fixedAssetData.put("productionRunId", productionRunId); + HtmlFormWrapper editProdRunFixedAssetWrapper = new HtmlFormWrapper("/jobshopmgt/ProductionRunForms.xml", "EditProductionRunTaskFixedAsset", request, response); + editProdRunFixedAssetWrapper.putInContext("fixedAssetData", fixedAssetData); + editProdRunFixedAssetWrapper.putInContext("actionForm", "updateFixedAsset"); + editProdRunFixedAssetWrapper.putInContext("actionIsAdd", "null"); + editProdRunFixedAssetWrapper.putInContext("declarationScreen", "Y"); + context.put("editProdRunFixedAssetWrapper", editProdRunFixedAssetWrapper); + context.put("fixedAssetId", fixedAssetId); + } + // Fixed assets list + List productionRunFixedAssetsData = new LinkedList(); + for (Iterator tasksIt = productionRunRoutingTasks.iterator(); tasksIt.hasNext();) { + GenericValue prodRunTask = (GenericValue)tasksIt.next(); + List taskFixedAssets = prodRunTask.getRelated("WorkEffortFixedAssetAssign"); + productionRunFixedAssetsData.addAll(taskFixedAssets); + } + HtmlFormWrapper ListProductionRunFixedAssetsWrapper = new HtmlFormWrapper("/jobshopmgt/ProductionRunForms.xml", "ListProductionRunTaskFixedAssets", request, response); + ListProductionRunFixedAssetsWrapper.putInContext("productionRunId", productionRunId); + ListProductionRunFixedAssetsWrapper.putInContext("productionRunFixedAssetsData", productionRunFixedAssetsData); + ListProductionRunFixedAssetsWrapper.putInContext("declarationScreen", "Y"); + context.put("ListProductionRunFixedAssetsWrapper", ListProductionRunFixedAssetsWrapper); } } Modified: incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml Sun Oct 15 03:51:31 2006 @@ -362,6 +362,28 @@ <response name="success" type="view" value="EditRoutingTaskCosts"/> <response name="error" type="view" value="EditRoutingTaskCosts"/> </request-map> + <request-map uri="EditRoutingTaskFixedAssets"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditRoutingTaskFixedAssets"/> + </request-map> + <request-map uri="createRoutingTaskFixedAsset"> + <security https="true" auth="true"/> + <event type="service" invoke="createWorkEffortFixedAssetStd"/> + <response name="success" type="view" value="EditRoutingTaskFixedAssets"/> + <response name="error" type="view" value="EditRoutingTaskFixedAssets"/> + </request-map> + <request-map uri="updateRoutingTaskFixedAsset"> + <security https="true" auth="true"/> + <event type="service" invoke="updateWorkEffortFixedAssetStd"/> + <response name="success" type="view" value="EditRoutingTaskFixedAssets"/> + <response name="error" type="view" value="EditRoutingTaskFixedAssets"/> + </request-map> + <request-map uri="removeRoutingTaskFixedAsset"> + <security https="true" auth="true"/> + <event type="service" invoke="removeWorkEffortFixedAssetStd"/> + <response name="success" type="view" value="EditRoutingTaskFixedAssets"/> + <response name="error" type="view" value="EditRoutingTaskFixedAssets"/> + </request-map> <!-- CostCalc mappings --> <request-map uri="EditCostCalcs"> <security https="true" auth="true"/> @@ -517,6 +539,13 @@ <response name="success" type="view" value="EditProductionRun"/> <response name="error" type="view" value="EditProductionRun"/> </request-map> + <request-map uri="removeProductionRunFixedAsset"> + <security https="true" auth="true"/> + <event type="simple" path="org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml" invoke="removeProductionRunFixedAsset" /> + <response name="docs_not_printed" type="view" value="EditProductionRun" /> + <response name="docs_printed" type="view" value="ProductionRunDeclaration" /> + <response name="error" type="view" value="EditProductionRun" /> + </request-map> <!-- Production Run Declaration --> <request-map uri="changeProductionRunStatusToPrinted"> <security https="true" auth="true"/> @@ -677,7 +706,7 @@ <view-map name="EditRouting" page="component://manufacturing/widget/manufacturing/RoutingScreens.xml#EditRouting" type="screen"/> <view-map name="EditRoutingTaskAssoc" page="component://manufacturing/widget/manufacturing/RoutingScreens.xml#EditRoutingTaskAssoc" type="screen"/> <view-map name="EditRoutingProductLink" page="component://manufacturing/widget/manufacturing/RoutingScreens.xml#EditRoutingProductLink" type="screen"/> - + <view-map name="EditRoutingTaskFixedAssets" page="component://manufacturing/widget/manufacturing/RoutingScreens.xml#EditRoutingTaskFixedAssets" type="screen"/> <!-- Lookup view mappings --> <view-map name="LookupProduct" page="component://product/widget/catalog/LookupScreens.xml#LookupProduct" type="screen"/> <view-map name="LookupVariantProduct" page="component://product/widget/catalog/LookupScreens.xml#LookupVariantProduct" type="screen"/> Modified: incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl (original) +++ incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl Sun Oct 15 03:51:31 2006 @@ -142,6 +142,26 @@ </table> </td> </#if> + <#-- Fixed Asset assign sub-screen Update or Add --> + <#if fixedAssetId?has_content || actionForm=="AddFixedAsset"> + <td> </td> + <td> + <table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside"> + <tr><td> + <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop"> + <tr> + <#if fixedAssetId?has_content> <#-- Fixed Asset Assign Update --> + <td><div class="boxhead">${uiLabelMap.CommonEdit} ${uiLabelMap.ManufacturingProductionRunFixedAssetAssign}</div></td> + <#else> <#-- Fixed Asset Assign Add --> + <td><div class="boxhead">${uiLabelMap.ManufacturingAddProductionRunFixedAssetAssign}</div></td> + </#if> + </tr> + </table> + ${editProdRunFixedAssetWrapper.renderFormString(context)} + </td></tr> + </table> + </td> + </#if> </tr> </table> <br/> @@ -175,6 +195,22 @@ </tr> </table> ${ListProductionRunComponentsWrapper.renderFormString(context)} + </td></tr> + </table> + + <#-- List of ProductionRun Fixed Assets sub-screen --> + <table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside"> + <tr><td> + <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop"> + <tr> + <td><div class="boxhead">${uiLabelMap.ManufacturingListOfProductionRunFixedAssets}</div></td> + <td align="right"><div class="tabletext"> + <a href="<@ofbizUrl>EditProductionRun?productionRunId=${productionRunId}&actionForm=AddFixedAsset</@ofbizUrl>" class="submenutextright"> + ${uiLabelMap.ManufacturingAddProductionRunFixedAssetAssign}</a> + </td> + </tr> + </table> + ${ListProductionRunFixedAssetsWrapper.renderFormString(context)} </td></tr> </table> <#else> Modified: incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl (original) +++ incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl Sun Oct 15 03:51:31 2006 @@ -197,6 +197,26 @@ </table> </td> </#if> + <#-- Fixed Asset assign sub-screen Update or Add --> + <#if fixedAssetId?has_content || actionForm=="AddFixedAsset"> + <td> </td> + <td> + <table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside"> + <tr><td> + <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop"> + <tr> + <#if fixedAssetId?has_content> <#-- Fixed Asset Assign Update --> + <td><div class="boxhead">${uiLabelMap.CommonEdit} ${uiLabelMap.ManufacturingProductionRunFixedAssetAssign}</div></td> + <#else> <#-- Fixed Asset Assign Add --> + <td><div class="boxhead">${uiLabelMap.ManufacturingAddProductionRunFixedAssetAssign}</div></td> + </#if> + </tr> + </table> + ${editProdRunFixedAssetWrapper.renderFormString(context)} + </td></tr> + </table> + </td> + </#if> </tr> </table> <br/> @@ -235,6 +255,22 @@ </tr> </table> ${ListProductionRunComponentsWrapper.renderFormString(context)} + </td></tr> + </table> + + <#-- List of ProductionRun Fixed Assets sub-screen --> + <table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside"> + <tr><td> + <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop"> + <tr> + <td><div class="boxhead">${uiLabelMap.ManufacturingListOfProductionRunFixedAssets}</div></td> + <td align="right"><div class="tabletext"> + <a href="<@ofbizUrl>ProductionRunDeclaration?productionRunId=${productionRunId}&actionForm=AddFixedAsset</@ofbizUrl>" class="submenutextright"> + ${uiLabelMap.ManufacturingAddProductionRunFixedAssetAssign}</a> + </td> + </tr> + </table> + ${ListProductionRunFixedAssetsWrapper.renderFormString(context)} </td></tr> </table> <#else> Modified: incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml Sun Oct 15 03:51:31 2006 @@ -420,6 +420,77 @@ <hyperlink target="/facility/control/EditInventoryItem?inventoryItemId=${inventoryItemId}" description="${inventoryItemId}" also-hidden="false" target-type="inter-app"/> </field> </form> + <form name="ListProductionRunTaskFixedAssets" type="list" target="EditProductionRun" + title="" list-name="productionRunFixedAssetsData" + default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext"> + <alt-target use-when="declarationScreen.equals("Y")" target="ProductionRunDeclaration" /> + <auto-fields-entity entity-name="WorkEffortFixedAssetAssign" default-field-type="display" /> + <field name="workEffortId"> + <display-entity entity-name="WorkEffort" description="[${workEffortId}] ${workEffortName}" /> + </field> + <field name="fixedAssetId"> + <display-entity entity-name="FixedAsset" description="${fixedAssetName}" /> + </field> + <field name="statusId"> + <display-entity entity-name="StatusItem" /> + </field> + <field name="editLink" title="" widget-style="smallSubmit" + use-when="!"${declarationScreen}".equals("Y")"> + <hyperlink description="${uiLabelMap.CommonEdit}" also-hidden="false" + target="EditProductionRun?actionForm=UpdateFixedAsset&workEffortId=${workEffortId}&fixedAssetId=${fixedAssetId}&fromDate=${fromDate}&productionRunId=${productionRunId}" /> + </field> + <field name="editLink" title="" widget-style="smallSubmit" + use-when=""${declarationScreen}".equals("Y")"> + <hyperlink description="${uiLabelMap.CommonEdit}" also-hidden="false" + target="ProductionRunDeclaration?actionForm=UpdateFixedAsset&workEffortId=${workEffortId}&fixedAssetId=${fixedAssetId}&fromDate=${fromDate}&productionRunId=${productionRunId}" /> + </field> + <field name="deleteLink" title="" widget-style="smallSubmit"> + <hyperlink description="${uiLabelMap.CommonDelete}" also-hidden="false" + target="removeProductionRunFixedAsset?workEffortId=${workEffortId}&fixedAssetId=${fixedAssetId}&fromDate=${fromDate}&productionRunId=${productionRunId}" /> + </field> + </form> + <form name="EditProductionRunTaskFixedAsset" type="single" target="EditProductionRun" + title="" default-map-name="fixedAssetData" + default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext"> + <alt-target use-when="declarationScreen.equals("Y")" target="ProductionRunDeclaration" /> + <auto-fields-entity entity-name="WorkEffortFixedAssetAssign" /> + <field name="actionForm"><hidden value="${actionForm}" /></field> + <field name="productionRunId"><hidden /></field> + <field name="workEffortId" use-when="${actionIsAdd}!=null"> + <drop-down allow-empty="false"> + <entity-options entity-name="WorkEffort" description="[${workEffortId}] ${workEffortName}"> + <entity-constraint name="workEffortParentId" value="${productionRunId}" /> + </entity-options> + </drop-down> + </field> + <field name="workEffortId" use-when="${actionIsAdd}==null"> + <display-entity entity-name="WorkEffort" description="[${workEffortId}] ${workEffortName}" /> + </field> + <field name="fixedAssetId" use-when="${actionIsAdd}!=null"> + <drop-down allow-empty="false"> + <entity-options entity-name="FixedAsset" description="${fixedAssetName}" /> + </drop-down> + </field> + <field name="fixedAssetId" use-when="${actionIsAdd}==null"> + <display-entity entity-name="FixedAsset" description="${fixedAssetName}" /> + </field> + <field name="fromDate" use-when="${actionIsAdd}==null"> + <display /> + </field> + <field name="statusId"> + <!-- Statuses are not yet defined for the WorkEffortFixedAssetAssign entity + so this field will be hidden meanwhile + <drop-down> + <entity-options entity-name="StatusItem" description="${description}"> + <entity-constraint name="statusTypeId" value="WORK_EFF_ASSET_STTS" /> + </entity-options> + </drop-down> --> + <hidden /> + </field> + <field name="submitButton" title="${uiLabelButton}" widget-style="smallSubmit"> + <submit button-type="button" /> + </field> + </form> <!-- ******************* --> <!-- Shipment Plan Forms --> <!-- ******************* --> Modified: incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskForms.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskForms.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskForms.xml Sun Oct 15 03:51:31 2006 @@ -321,5 +321,35 @@ <submit button-type="button"/> </field> </form> - + + <!-- RoutingTask-FixedAsset association (WorkEffortFixedAssetStd) --> + <form name="ListRoutingTaskFixedAssets" type="list" title="" + target="updateRoutingTaskFixedAsset" list-name="allFixedAssets" + default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext"> + <auto-fields-entity entity-name="WorkEffortFixedAssetStd" /> + <field name="workEffortId"><hidden/></field> + <field name="fixedAssetTypeId"> + <display-entity entity-name="FixedAssetType" /> + </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"> + <submit button-type="button" /> + </field> + <field name="deleteLink" title="" widget-style="buttontext"> + <hyperlink target="removeRoutingTaskFixedAsset?workEffortId=${workEffortId}&fixedAssetTypeId=${fixedAssetTypeId}" + description="${uiLabelMap.CommonDelete}" also-hidden="false" /> + </field> + </form> + <form name="EditRoutingTaskFixedAsset" type="single" title="" target="createRoutingTaskFixedAsset" + default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext"> + <auto-fields-entity entity-name="WorkEffortFixedAssetStd" default-field-type="edit" /> + <field name="workEffortId"><hidden /></field> + <field name="fixedAssetTypeId"> + <drop-down allow-empty="false"> + <entity-options entity-name="FixedAssetType" description="${description}" /> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"> + <submit button-type="button" /> + </field> + </form> </forms> Modified: incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskTabBar.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskTabBar.ftl?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskTabBar.ftl (original) +++ incubator/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskTabBar.ftl Sun Oct 15 03:51:31 2006 @@ -24,5 +24,6 @@ <a href="<@ofbizUrl>EditRoutingTaskCosts?workEffortId=${routingTask.workEffortId}</@ofbizUrl>" class="${selectedClassMap.editRoutingTaskCosts?default(unselectedClassName)}">${uiLabelMap.ManufacturingRoutingTaskCosts}</a> <a href="<@ofbizUrl>ListRoutingTaskRoutings?workEffortId=${routingTask.workEffortId}</@ofbizUrl>" class="${selectedClassMap.listRoutingTaskRoutings?default(unselectedClassName)}">${uiLabelMap.ManufacturingListRoutings}</a> <a href="<@ofbizUrl>ListRoutingTaskProducts?workEffortId=${routingTask.workEffortId}</@ofbizUrl>" class="${selectedClassMap.listRoutingTaskProducts?default(unselectedClassName)}">${uiLabelMap.ManufacturingListProducts}</a> + <a href="<@ofbizUrl>EditRoutingTaskFixedAssets?workEffortId=${routingTask.workEffortId}</@ofbizUrl>" class="${selectedClassMap.editRoutingTaskFixedAssets?default(unselectedClassName)}">${uiLabelMap.ManufacturingRoutingTaskFixedAssets}</a> </div> -</#if> \ No newline at end of file +</#if> Modified: incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml?view=diff&rev=464154&r1=464153&r2=464154 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml Sun Oct 15 03:51:31 2006 @@ -360,6 +360,33 @@ </widgets> </section> </screen> + <screen name="EditRoutingTaskFixedAssets"> + <section> + <actions> + <set field="title" value="Edit a Routing Task-Fixed Asset association" /> + <set field="titlePr |
Free forum by Nabble | Edit this page |