svn commit: r664146 - in /ofbiz/trunk/specialpurpose/assetmaint: script/org/ofbiz/assetmaint/FixedAssetMaintEvents.xml widget/forms/WorkEffortForms.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r664146 - in /ofbiz/trunk/specialpurpose/assetmaint: script/org/ofbiz/assetmaint/FixedAssetMaintEvents.xml widget/forms/WorkEffortForms.xml

adrianc
Author: adrianc
Date: Fri Jun  6 14:47:19 2008
New Revision: 664146

URL: http://svn.apache.org/viewvc?rev=664146&view=rev
Log:
Cancelled Fixed Asset Maints now cancel their associated work efforts - in the Asset Maint component only. I don't know if this is something we want in Accounting also.

Modified:
    ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/FixedAssetMaintEvents.xml
    ofbiz/trunk/specialpurpose/assetmaint/widget/forms/WorkEffortForms.xml

Modified: ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/FixedAssetMaintEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/FixedAssetMaintEvents.xml?rev=664146&r1=664145&r2=664146&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/FixedAssetMaintEvents.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/FixedAssetMaintEvents.xml Fri Jun  6 14:47:19 2008
@@ -39,7 +39,6 @@
             <result-to-field result-name="maintHistSeqId" map-name="findAssetMaintLookup" field-name="maintHistSeqId"/>
             <result-to-request result-name="maintHistSeqId"/>
         </call-service>
-
         <set from-field="parameters.fixedAssetId" field="findAssetMaintLookup.fixedAssetId"/>
         <find-by-primary-key entity-name="FixedAssetMaint" map-name="findAssetMaintLookup" value-name="findAssetMaint"/>
         <set from-field="findAssetMaint.scheduleWorkEffortId" field="updateWorkEffortCtx.workEffortId"/>
@@ -51,19 +50,23 @@
         <find-by-primary-key entity-name="ProductMaintType" map-name="maintTypeLookup" value-name="maintType"/>
         <set field="updateWorkEffortCtx.description" from-field="maintType.description"/>
         <call-service service-name="updateWorkEffort" in-map-name="updateWorkEffortCtx"/>
-    </simple-method>    
+    </simple-method>
+
     <simple-method method-name="updateFixedAssetMaintAndWorkEffort" login-required="true"
         short-description="Update FixedAssetMaint and Schedule information in WorkEffort">
         <check-errors/>
         <set-service-fields map-name="parameters" service-name="updateFixedAssetMaint" to-map-name="updateFixedAssetMaintCtx"/>
         <call-service service-name="updateFixedAssetMaint" in-map-name="updateFixedAssetMaintCtx"/>
         <check-errors/>
+        <if-compare field-name="parameters.statusId" operator="equals" value="FAM_CANCELLED">
+            <set field="updateWorkEffortCtx.currentStatusId" value="CAL_CANCELLED"/>
+        </if-compare>
         <set from-field="parameters.scheduleWorkEffortId" field="updateWorkEffortCtx.workEffortId"/>
         <set-service-fields map-name="parameters" service-name="updateWorkEffort" to-map-name="updateWorkEffortCtx"/>
         <call-service service-name="updateWorkEffort" in-map-name="updateWorkEffortCtx"/>
         <check-errors/>
     </simple-method>    
-    
+
     <simple-method method-name="createWorkEffortAndAssoc" login-required="true"
         short-description="Create WorkEffort and Associate it with Parent (identified by workEffortFromId)">
         <set from-field="parameters.workEffortIdTo" field="parameters.workEffortId"/>

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/forms/WorkEffortForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/forms/WorkEffortForms.xml?rev=664146&r1=664145&r2=664146&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/forms/WorkEffortForms.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/forms/WorkEffortForms.xml Fri Jun  6 14:47:19 2008
@@ -45,6 +45,9 @@
                     <entity-constraint name="statusTypeId" value="EVENT_STATUS"/>
                     <entity-order-by field-name="description"/>
                 </entity-options>
+                <entity-options entity-name="StatusItem" key-field-name="statusId" description="${description}">
+                    <entity-constraint name="statusId" value="CAL_CANCELLED"/>
+                </entity-options>
             </drop-down>
         </field>
         <field map-name="workEffort" name="percentComplete" position="2"><text/></field>
@@ -85,6 +88,9 @@
                     <entity-constraint name="statusTypeId" value="TASK_STATUS"/>
                     <entity-order-by field-name="description"/>
                 </entity-options>
+                <entity-options entity-name="StatusItem" key-field-name="statusId" description="${description}">
+                    <entity-constraint name="statusId" value="CAL_CANCELLED"/>
+                </entity-options>
             </drop-down>
         </field>
         <field name="workEffortPurposeTypeId" title="${uiLabelMap.CommonPurpose}">
@@ -127,6 +133,9 @@
                     <entity-constraint name="statusTypeId" value="TASK_STATUS"/>
                     <entity-order-by field-name="description"/>
                 </entity-options>
+                <entity-options entity-name="StatusItem" key-field-name="statusId" description="${description}">
+                    <entity-constraint name="statusId" value="CAL_CANCELLED"/>
+                </entity-options>
             </drop-down>
         </field>
         <field name="workEffortPurposeTypeId" entry-name="workEffortToWorkEffortPurposeTypeId" title="${uiLabelMap.CommonPurpose}">