You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2009/09/01 16:45:51 UTC

svn commit: r810078 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/ script/org/ofbiz/accounting/finaccount/ script/org/ofbiz/accounting/fixedasset/ servicedef/

Author: ashish
Date: Tue Sep  1 14:45:50 2009
New Revision: 810078

URL: http://svn.apache.org/viewvc?rev=810078&view=rev
Log:
Moving service definition and implementation to appropriate place - part of jira issue OFBIZ-2887.
Thanks Parimal for the patch.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
    ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml
    ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml?rev=810078&r1=810077&r2=810078&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml Tue Sep  1 14:45:50 2009
@@ -37,4 +37,35 @@
             </if-empty>
         </iterate>
     </simple-method>
+
+    <simple-method method-name="migrateStatusToFinAccountTrans" short-description="Migrate statusId to FinAccountTrans entity">
+        <entity-condition entity-name="FinAccountTrans" list="finAccountTransList">
+            <use-iterator/>
+        </entity-condition>    
+        <iterate list="finAccountTransList" entry="finAccountTrans">
+            <if-empty field="finAccountTrans.statusId">
+                <set field="finAccountTrans.statusId" value="FINACT_TRNS_APPROVED"/>
+                <store-value value-field="finAccountTrans"/>
+            </if-empty>
+        </iterate>
+    </simple-method>
+
+    <simple-method method-name="migrateFixedAssetMaintMeter" short-description="Copy FixedAssetMaintMeter To FixedAssetMeter">
+        <entity-condition list="maintMeterList" entity-name="FixedAssetMaintMeter"/>
+        <iterate list="maintMeterList" entry="maintMeter">
+            <make-value value-field="newEntity" entity-name="FixedAssetMeter"/>
+            <set-pk-fields map="maintMeter" value-field="newEntity"/>
+            <set-nonpk-fields map="maintMeter" value-field="newEntity"/>
+            <set field="newEntity.readingDate" from-field="maintMeter.createdStamp"/>
+            <entity-one entity-name="FixedAssetMeter" value-field="lookedUpValue" auto-field-map="false">
+                <field-map field-name="fixedAssetId" from-field="newEntity.fixedAssetId"/>
+                <field-map field-name="productMeterTypeId" from-field="newEntity.productMeterTypeId"/>
+                <field-map field-name="readingDate" from-field="newEntity.readingDate"/>
+            </entity-one>
+            <if-empty field="lookedUpValue">
+                <create-value value-field="newEntity"/>
+                <check-errors/>
+            </if-empty>
+        </iterate>
+    </simple-method>
 </simple-methods>
\ No newline at end of file

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=810078&r1=810077&r2=810078&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Tue Sep  1 14:45:50 2009
@@ -371,18 +371,6 @@
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
 
-    <simple-method method-name="migrateStatusToFinAccountTrans" short-description="Migrate statusId to FinAccountTrans entity">
-        <entity-condition entity-name="FinAccountTrans" list="finAccountTransList">
-            <use-iterator/>
-        </entity-condition>    
-        <iterate list="finAccountTransList" entry="finAccountTrans">
-            <if-empty field="finAccountTrans.statusId">
-                <set field="finAccountTrans.statusId" value="FINACT_TRNS_APPROVED"/>
-                <store-value value-field="finAccountTrans"/>
-            </if-empty>
-        </iterate>
-    </simple-method>
-    
     <simple-method method-name="depositWithdrawPayments" short-description="Deposit withdraw payments">
         <set field="paymentIds" from-field="parameters.paymentIds"/>
         <set field="finAccountId" from-field="parameters.finAccountId"/>

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml?rev=810078&r1=810077&r2=810078&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml Tue Sep  1 14:45:50 2009
@@ -453,24 +453,6 @@
             </iterate>
         </iterate>
     </simple-method>
-    <simple-method method-name="migrateFixedAssetMaintMeter" short-description="Copy FixedAssetMaintMeter To FixedAssetMeter">
-        <entity-condition list="maintMeterList" entity-name="FixedAssetMaintMeter"/>
-        <iterate list="maintMeterList" entry="maintMeter">
-            <make-value value-field="newEntity" entity-name="FixedAssetMeter"/>
-            <set-pk-fields map="maintMeter" value-field="newEntity"/>
-            <set-nonpk-fields map="maintMeter" value-field="newEntity"/>
-            <set field="newEntity.readingDate" from-field="maintMeter.createdStamp"/>
-            <entity-one entity-name="FixedAssetMeter" value-field="lookedUpValue" auto-field-map="false">
-                <field-map field-name="fixedAssetId" from-field="newEntity.fixedAssetId"/>
-                <field-map field-name="productMeterTypeId" from-field="newEntity.productMeterTypeId"/>
-                <field-map field-name="readingDate" from-field="newEntity.readingDate"/>
-            </entity-one>
-            <if-empty field="lookedUpValue">
-                <create-value value-field="newEntity"/>
-                <check-errors/>
-            </if-empty>
-        </iterate>
-    </simple-method>
 
     <!--  create/update/delete FixedAssetMaintOrder -->
     <simple-method method-name="createFixedAssetMaintOrder" short-description="Create a FixedAsset Maintenance Order">

Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml?rev=810078&r1=810077&r2=810078&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Tue Sep  1 14:45:50 2009
@@ -447,16 +447,6 @@
         <implements service="permissionInterface"/>
     </service>
 
-    <service name="migrateStatusToFinAccountTrans" engine="simple"
-            location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="migrateStatusToFinAccountTrans">
-        <description>
-            Migrate statusId to FinAccountTrans entity,
-            this service can be used to upgrade existing data i.e it sets the statusId(new field in entity) to "Approved" if found empty.
-            Before running this service, load the seed data for StatusType and StatusItem from the file :
-            accounting/data/AccountingTypeData.xml
-        </description>
-    </service>
-    
     <service name="depositWithdrawPayments" engine="simple"
             location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="depositWithdrawPayments">
         <description>Deposit withdraw payments</description>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml?rev=810078&r1=810077&r2=810078&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml Tue Sep  1 14:45:50 2009
@@ -198,11 +198,6 @@
         <permission-service service-name="fixedAssetPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
-    <service name="migrateFixedAssetMaintMeter" engine="simple"
-                location="component://accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="migrateFixedAssetMaintMeter" auth="true">
-        <description>Copy the FixedAssetMaintMeter entity to FixedAssetMeter. FixedAssetMeter.readingDate will be replaced with FixedAssetMaintMeter.createdStamp.</description>
-        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
-    </service>
     <!-- FixedAsset Maintenance Order Create/Update/Delete-->
     <service name="createFixedAssetMaintOrder" default-entity-name="FixedAssetMaintOrder" engine="simple"
                 location="component://accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAssetMaintOrder" auth="true">

Modified: ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml?rev=810078&r1=810077&r2=810078&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml Tue Sep  1 14:45:50 2009
@@ -32,4 +32,20 @@
             accounting/data/AccountingTypeData.xml
         </description>
     </service>
+
+    <service name="migrateStatusToFinAccountTrans" engine="simple"
+            location="component://accounting/script/org/ofbiz/accounting/UpgradeServices.xml" invoke="migrateStatusToFinAccountTrans">
+        <description>
+            Migrate statusId to FinAccountTrans entity,
+            this service can be used to upgrade existing data i.e it sets the statusId(new field in entity) to "Approved" if found empty.
+            Before running this service, load the seed data for StatusType and StatusItem from the file :
+            accounting/data/AccountingTypeData.xml
+        </description>
+    </service>
+
+    <service name="migrateFixedAssetMaintMeter" engine="simple"
+                location="component://accounting/script/org/ofbiz/accounting/UpgradeServices.xml" invoke="migrateFixedAssetMaintMeter" auth="true">
+        <description>Copy the FixedAssetMaintMeter entity to FixedAssetMeter. FixedAssetMeter.readingDate will be replaced with FixedAssetMaintMeter.createdStamp.</description>
+        <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
+    </service>
 </services>
\ No newline at end of file