svn commit: r730502 [2/2] - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml

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

svn commit: r730502 [2/2] - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml

jleroux@apache.org

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=730502&r1=730501&r2=730502&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Wed Dec 31 18:03:24 2008
@@ -23,55 +23,55 @@
 
     <!-- ========= GlAccount methods ========= -->
     <simple-method method-name="createGlAccount" short-description="Create an GlAccount">
-        <make-value entity-name="GlAccount" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+        <make-value entity-name="GlAccount" value-field="newEntity"/>
+        <set-nonpk-fields map="parameters" value-field="newEntity"/>
 
         <!-- GlAccount uses a sequenced id, so get the next one now and set it... -->
         <if-empty field="parameters.glAccountId">
-            <sequenced-id-to-env sequence-name="GlAccount" env-name="newEntity.glAccountId"/>
+            <sequenced-id sequence-name="GlAccount" field="newEntity.glAccountId"/>
         <else>
-            <set-pk-fields map-name="parameters" value-name="newEntity"/>
+            <set-pk-fields map="parameters" value-field="newEntity"/>
         </else>
         </if-empty>
-        <field-to-result field-name="newEntity.glAccountId" result-name="glAccountId"/>
+        <field-to-result field="newEntity.glAccountId" result-name="glAccountId"/>
         
-        <create-value value-name="newEntity"/>
+        <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="updateGlAccount" short-description="Update an GlAccount">
-        <make-value entity-name="GlAccount" value-name="lookupPKMap"/>
-        <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
-        <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
-        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
-        <store-value value-name="lookedUpValue"/>
+        <make-value entity-name="GlAccount" value-field="lookupPKMap"/>
+        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
+        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
+        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
+        <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteGlAccount" short-description="Delete an GlAccount">
-        <make-value entity-name="GlAccount" value-name="lookupPKMap"/>
-        <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
-        <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
-        <remove-value value-name="lookedUpValue"/>
+        <make-value entity-name="GlAccount" value-field="lookupPKMap"/>
+        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
+        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
+        <remove-value value-field="lookedUpValue"/>
     </simple-method>
     
     <!-- ========= GlAccountOrganization methods ========= -->
     <simple-method method-name="createGlAccountOrganization" short-description="Create GlAccountOrganization">
-        <make-value entity-name="GlAccountOrganization" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
+        <make-value entity-name="GlAccountOrganization" value-field="newEntity"/>
+        <set-nonpk-fields map="parameters" value-field="newEntity"/>
+        <set-pk-fields map="parameters" value-field="newEntity"/>
 
-        <create-value value-name="newEntity"/>
+        <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="updateGlAccountOrganization" short-description="Update GlAccountOrganization">
-        <make-value entity-name="GlAccountOrganization" value-name="lookupPKMap"/>
-        <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
-        <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
-        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
+        <make-value entity-name="GlAccountOrganization" value-field="lookupPKMap"/>
+        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
+        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
+        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
       
-        <store-value value-name="lookedUpValue"/>
+        <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteGlAccountOrganization" short-description="Delete GlAccountOrganization">
-        <make-value entity-name="GlAccountOrganization" value-name="lookupPKMap"/>
-        <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
-        <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
-        <remove-value value-name="lookedUpValue"/>
+        <make-value entity-name="GlAccountOrganization" value-field="lookupPKMap"/>
+        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
+        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
+        <remove-value value-field="lookedUpValue"/>
     </simple-method>
 
     <!-- ========= GlJournal methods ========= -->
@@ -79,8 +79,8 @@
         <!-- TODO: Do we need to create a GlJournal record here? -->
     
         <!-- first, create the AcctgTrans -->
-        <set-service-fields service-name="createAcctgTrans" to-map-name="createAcctgTransParams" map-name="parameters"/>
-        <now-timestamp-to-env env-name="createAcctgTransParams.transactionDate"/>
+        <set-service-fields service-name="createAcctgTrans" to-map="createAcctgTransParams" map="parameters"/>
+        <now-timestamp field="createAcctgTransParams.transactionDate"/>
         <call-service service-name="createAcctgTrans" in-map-name="createAcctgTransParams">
             <result-to-field result-name="acctgTransId"/>
         </call-service>
@@ -88,7 +88,7 @@
         <!-- TODO: if someday there are more than one type of acctgTransEntryTypeId (other than _NA_, we should get rid of the lines below
             that fix those values -->
         <!-- now, create the debit AcctgTransEntry -->
-        <set-service-fields service-name="createAcctgTransEntry" map-name="parameters" to-map-name="createAcctgTransEntryParams"/>
+        <set-service-fields service-name="createAcctgTransEntry" map="parameters" to-map="createAcctgTransEntryParams"/>
         <set field="createAcctgTransEntryParams.acctgTransId" from-field="acctgTransId"/>
         <set field="createAcctgTransEntryParams.glAccountId" from-field="parameters.debitGlAccountId"/>
         <set field="createAcctgTransEntryParams.debitCreditFlag" value="D"/>
@@ -96,70 +96,70 @@
         <call-service service-name="createAcctgTransEntry" in-map-name="createAcctgTransEntryParams"/>
         
         <!-- now the credit AcctgTransEntry -->
-        <set-service-fields service-name="createAcctgTransEntry" map-name="parameters" to-map-name="createAcctgTransEntryParams"/>
+        <set-service-fields service-name="createAcctgTransEntry" map="parameters" to-map="createAcctgTransEntryParams"/>
         <set field="createAcctgTransEntryParams.acctgTransId" from-field="acctgTransId"/>
         <set field="createAcctgTransEntryParams.glAccountId" from-field="parameters.creditGlAccountId"/>
         <set field="createAcctgTransEntryParams.debitCreditFlag" value="C"/>
         <set field="createAcctgTransEntryParams.acctgTransEntryTypeId" value="_NA_"/>
         <call-service service-name="createAcctgTransEntry" in-map-name="createAcctgTransEntryParams"/>
         
-        <field-to-result field-name="acctgTransId" result-name="acctgTransId"/>
+        <field-to-result field="acctgTransId" result-name="acctgTransId"/>
     </simple-method>
       
     <simple-method method-name="createGlJournal" short-description="Create an GlJournal">
-        <make-value entity-name="GlJournal" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+        <make-value entity-name="GlJournal" value-field="newEntity"/>
+        <set-nonpk-fields map="parameters" value-field="newEntity"/>
 
         <!-- GlJournal uses a sequenced id, so get the next one now and set it... -->        
-        <sequenced-id-to-env sequence-name="GlJournal" env-name="newEntity.glJournalId"/>
-        <field-to-result field-name="newEntity.glJournalId" result-name="glJournalId"/>
+        <sequenced-id sequence-name="GlJournal" field="newEntity.glJournalId"/>
+        <field-to-result field="newEntity.glJournalId" result-name="glJournalId"/>
 
-        <create-value value-name="newEntity"/>
+        <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="updateGlJournal" short-description="Update an GlJournal">
-        <entity-one entity-name="GlJournal" value-name="lookedUpValue"/>
-        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
-        <store-value value-name="lookedUpValue"/>
+        <entity-one entity-name="GlJournal" value-field="lookedUpValue"/>
+        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
+        <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteGlJournal" short-description="Delete an GlJournal">
-        <entity-one entity-name="GlJournal" value-name="lookedUpValue"/>
-        <remove-value value-name="lookedUpValue"/>
+        <entity-one entity-name="GlJournal" value-field="lookedUpValue"/>
+        <remove-value value-field="lookedUpValue"/>
     </simple-method>
         
     <!-- GlJournal Trial Balance and Post routines -->
     <simple-method method-name="calculateGlJournalTrialBalance" short-description="Calculate Trial Balance for a GlJournal">
         <!-- iterate through all AcctgTrans in this journal and that are not yet posted, and get totals of all debits and of all credits -->
-        <entity-condition entity-name="AcctgTrans" list-name="acctgTransList">
+        <entity-condition entity-name="AcctgTrans" list="acctgTransList">
             <condition-list combine="and">
-                <condition-expr field-name="glJournalId" env-name="parameters.glJournalId"/>
+                <condition-expr field-name="glJournalId" from-field="parameters.glJournalId"/>
                 <condition-expr field-name="isPosted" operator="not-equals" value="Y"/>
             </condition-list>
         </entity-condition>
         
-        <iterate entry-name="acctgTrans" list-name="acctgTransList">
-            <clear-field field-name="callServiceMap"/>
-            <clear-field field-name="serviceResults"/>
+        <iterate entry="acctgTrans" list="acctgTransList">
+            <clear-field field="callServiceMap"/>
+            <clear-field field="serviceResults"/>
             <set from-field="acctgTrans.acctgTransId" field="callServiceMap.acctgTransId"/>
             <call-service service-name="calculateAcctgTransTrialBalance" in-map-name="callServiceMap">
                 <results-to-map map-name="serviceResults"/>
             </call-service>
-            <calculate field-name="debitTotal" type="Double">
-                <calcop operator="get" field-name="debitTotal"/>
-                <calcop operator="get" field-name="serviceResults.debitTotal"/>
-            </calculate>
-            <calculate field-name="creditTotal" type="Double">
-                <calcop operator="get" field-name="creditTotal"/>
-                <calcop operator="get" field-name="serviceResults.creditTotal"/>
-            </calculate>
-            <calculate field-name="debitCreditDifference" type="Double">
-                <calcop operator="get" field-name="debitCreditDifference"/>
-                <calcop operator="get" field-name="serviceResults.debitCreditDifference"/>
+            <calculate field="debitTotal" type="Double">
+                <calcop operator="get" field="debitTotal"/>
+                <calcop operator="get" field="serviceResults.debitTotal"/>
+            </calculate>
+            <calculate field="creditTotal" type="Double">
+                <calcop operator="get" field="creditTotal"/>
+                <calcop operator="get" field="serviceResults.creditTotal"/>
+            </calculate>
+            <calculate field="debitCreditDifference" type="Double">
+                <calcop operator="get" field="debitCreditDifference"/>
+                <calcop operator="get" field="serviceResults.debitCreditDifference"/>
             </calculate>
         </iterate>
         
-        <field-to-result field-name="debitTotal"/>
-        <field-to-result field-name="creditTotal"/>
-        <field-to-result field-name="debitCreditDifference"/>
+        <field-to-result field="debitTotal"/>
+        <field-to-result field="creditTotal"/>
+        <field-to-result field="debitCreditDifference"/>
     </simple-method>
 
     <simple-method method-name="postGlJournal" short-description="Post a GlJournal">
@@ -177,14 +177,14 @@
         </if-compare>
         
         <!-- iterate through all AcctgTrans in this journal and that are not yet posted, and post each one -->
-        <entity-condition entity-name="AcctgTrans" list-name="acctgTransList">
+        <entity-condition entity-name="AcctgTrans" list="acctgTransList">
             <condition-list combine="and">
-                <condition-expr field-name="glJournalId" env-name="parameters.glJournalId"/>
+                <condition-expr field-name="glJournalId" from-field="parameters.glJournalId"/>
                 <condition-expr field-name="isPosted" operator="not-equals" value="Y"/>
             </condition-list>
         </entity-condition>
-        <iterate entry-name="acctgTrans" list-name="acctgTransList">
-            <clear-field field-name="callServiceMap"/>
+        <iterate entry="acctgTrans" list="acctgTransList">
+            <clear-field field="callServiceMap"/>
             <set from-field="acctgTrans.acctgTransId" field="callServiceMap.acctgTransId"/>
             <call-service service-name="postAcctgTrans" in-map-name="callServiceMap"/>
         </iterate>
@@ -192,48 +192,48 @@
 
     <!-- ========= GlReconciliation methods ========= -->
     <simple-method method-name="createGlReconciliation" short-description="Create an GlReconciliation">
-        <make-value entity-name="GlReconciliation" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+        <make-value entity-name="GlReconciliation" value-field="newEntity"/>
+        <set-nonpk-fields map="parameters" value-field="newEntity"/>
 
         <!-- GlReconciliation uses a sequenced id, so get the next one now and set it... -->        
-        <sequenced-id-to-env sequence-name="GlReconciliation" env-name="newEntity.glReconciliationId"/>
-        <field-to-result field-name="newEntity.glReconciliationId" result-name="glReconciliationId"/>
+        <sequenced-id sequence-name="GlReconciliation" field="newEntity.glReconciliationId"/>
+        <field-to-result field="newEntity.glReconciliationId" result-name="glReconciliationId"/>
         
         <set from-field="userLogin.userLoginId" field="newEntity.lastModifiedByUserLogin"/>
         <set from-field="userLogin.userLoginId" field="newEntity.createdByUserLogin"/>
         
-        <create-value value-name="newEntity"/>
+        <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="updateGlReconciliation" short-description="Update an GlReconciliation">
-        <entity-one entity-name="GlReconciliation" value-name="lookedUpValue"/>
-        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
+        <entity-one entity-name="GlReconciliation" value-field="lookedUpValue"/>
+        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
         
         <set from-field="userLogin.userLoginId" field="lookedUpValue.lastModifiedByUserLogin"/>
-        <store-value value-name="lookedUpValue"/>
+        <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteGlReconciliation" short-description="Delete an GlReconciliation">
-        <entity-one entity-name="GlReconciliation" value-name="lookedUpValue"/>
-        <remove-value value-name="lookedUpValue"/>
+        <entity-one entity-name="GlReconciliation" value-field="lookedUpValue"/>
+        <remove-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="updateGlReconciliationLastModified" short-description="Update GlReconciliation LastModified Info">
         <!-- this is just a little method that is meant to be called as an inline call-simple-method target with the context already setup -->
-        <entity-one entity-name="GlReconciliation" value-name="lookedUpGLR"/>
+        <entity-one entity-name="GlReconciliation" value-field="lookedUpGLR"/>
         <set from-field="userLogin.userLoginId" field="lookedUpGLR.lastModifiedByUserLogin"/>
-        <store-value value-name="lookedUpGLR"/>
+        <store-value value-field="lookedUpGLR"/>
     </simple-method>
     
     <!-- ========= GlReconciliationEntry methods ========= -->
     <simple-method method-name="createGlReconciliationEntry" short-description="Add Entry To GlReconciliation">
         <!-- first of all, make sure that the AcctgTransEntry is not already reconciled -->
-        <entity-one entity-name="AcctgTransEntry" value-name="acctgTransEntry"/>
+        <entity-one entity-name="AcctgTransEntry" value-field="acctgTransEntry"/>
         <if-compare field="acctgTransEntry.reconcileStatusId" operator="equals" value="AES_RECONCILED">
             <add-error><fail-message message="The accounting transaction entry ${acctgTransEntry.acctgTransId}/${acctgTransEntry.acctgTransEntrySeqId} is already reconciled: cannot reconcile."/></add-error>
             <check-errors/>
         </if-compare>
-        <make-value entity-name="GlReconciliationEntry" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <create-value value-name="newEntity"/>
+        <make-value entity-name="GlReconciliationEntry" value-field="newEntity"/>
+        <set-nonpk-fields map="parameters" value-field="newEntity"/>
+        <set-pk-fields map="parameters" value-field="newEntity"/>
+        <create-value value-field="newEntity"/>
 
         <!-- update the status of the AcctgTransEntry to reconciled -->
         <set field="updateAcctgTransEntryInMap.acctgTransId" from-field="parameters.acctgTransId"/>
@@ -247,16 +247,16 @@
         <call-simple-method method-name="updateGlReconciliationLastModified"/>
     </simple-method>
     <simple-method method-name="updateGlReconciliationEntry" short-description="Update Entry To GlReconciliation">
-        <entity-one entity-name="GlReconciliationEntry" value-name="lookedUpValue"/>
-        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
-        <store-value value-name="lookedUpValue"/>
+        <entity-one entity-name="GlReconciliationEntry" value-field="lookedUpValue"/>
+        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
+        <store-value value-field="lookedUpValue"/>
         
         <!-- when changing entries, also update the last modified info for the GlReconciliation -->
         <call-simple-method method-name="updateGlReconciliationLastModified"/>
     </simple-method>
     <simple-method method-name="deleteGlReconciliationEntry" short-description="Remove Entry From GlReconciliation">
-        <entity-one entity-name="GlReconciliationEntry" value-name="lookedUpValue"/>
-        <remove-value value-name="lookedUpValue"/>
+        <entity-one entity-name="GlReconciliationEntry" value-field="lookedUpValue"/>
+        <remove-value value-field="lookedUpValue"/>
 
         <!-- when changing entries, also update the last modified info for the GlReconciliation -->
         <call-simple-method method-name="updateGlReconciliationLastModified"/>
@@ -264,17 +264,17 @@
 
     <!-- ========== GL Posting Services ========== -->
     <simple-method method-name="completeAcctgTransEntries" short-description="Completes, if possible, the AcctgTransEntries using the mappings defined in the gl setup">
-        <entity-one entity-name="AcctgTrans" value-name="acctgTrans"/>
+        <entity-one entity-name="AcctgTrans" value-field="acctgTrans"/>
         <if-compare field="acctgTrans.isPosted" operator="equals" value="Y">
             <add-error><fail-property resource="AccountingUiLabels" property="AccountingTransactionHasBeenAlreadyPosted"/></add-error>
             <check-errors/>    
         </if-compare>
-        <get-related value-name="acctgTrans" relation-name="AcctgTransEntry" list-name="acctgTransEntries"/>
-        <iterate list-name="acctgTransEntries" entry-name="acctgTransEntry">
+        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntries"/>
+        <iterate list="acctgTransEntries" entry="acctgTransEntry">
             <!-- if the glAccountId is empty, but we have a glAccountTypeId, then we will determine the
                  correct glAccountId from the gl setup settings -->
             <if-empty field="acctgTransEntry.glAccountId">
-                <clear-field field-name="getGlAccountFromAccountTypeInMap"/>
+                <clear-field field="getGlAccountFromAccountTypeInMap"/>
                 <set field="getGlAccountFromAccountTypeInMap.organizationPartyId" from-field="acctgTransEntry.organizationPartyId"/>
                 <set field="getGlAccountFromAccountTypeInMap.acctgTransTypeId" from-field="acctgTrans.acctgTransTypeId"/>
                 <set field="getGlAccountFromAccountTypeInMap.glAccountTypeId" from-field="acctgTransEntry.glAccountTypeId"/>
@@ -285,32 +285,32 @@
                 <set field="getGlAccountFromAccountTypeInMap.invoiceId" from-field="acctgTrans.invoiceId"/>
                 <set field="getGlAccountFromAccountTypeInMap.paymentId" from-field="acctgTrans.paymentId"/>
                 <call-service service-name="getGlAccountFromAccountType" in-map-name="getGlAccountFromAccountTypeInMap">
-                    <result-to-field result-name="glAccountId" field-name="acctgTransEntry.glAccountId"/>
+                    <result-to-field result-name="glAccountId" field="acctgTransEntry.glAccountId"/>
                 </call-service>
             </if-empty>
             <if-empty field="acctgTransEntry.origAmount">
                 <set field="acctgTransEntry.origAmount" from-field="acctgTransEntry.amount"/>
             </if-empty>
-            <entity-one entity-name="GlAccountType" value-name="glAccountType" use-cache="true" auto-field-map="false">
-                <field-map field-name="glAccountTypeId" env-name="acctgTransEntry.glAccountTypeId"/>
+            <entity-one entity-name="GlAccountType" value-field="glAccountType" use-cache="true" auto-field-map="false">
+                <field-map field-name="glAccountTypeId" from-field="acctgTransEntry.glAccountTypeId"/>
             </entity-one>
             <if-empty field="glAccountType">
-                <clear-field field-name="acctgTransEntry.glAccountTypeId"/>
+                <clear-field field="acctgTransEntry.glAccountTypeId"/>
             </if-empty>
-            <store-value value-name="acctgTransEntry"/>
+            <store-value value-field="acctgTransEntry"/>
         </iterate>
     </simple-method>
     <simple-method method-name="createAcctgTransAndEntries" short-description="Verifies and posts a set of AcctgTransEntries">
         <!-- retrieve ledger rounding properties -->
-        <property-to-field resource="arithmetic" property="ledger.decimals" field-name="ledgerDecimals"/>
-        <property-to-field resource="arithmetic" property="ledger.rounding" field-name="roundingMode"/>
+        <property-to-field resource="arithmetic" property="ledger.decimals" field="ledgerDecimals"/>
+        <property-to-field resource="arithmetic" property="ledger.rounding" field="roundingMode"/>
         <log level="info" message="Using ledger decimals [${ledgerDecimals}] and rounding [${roundingMode}]"/>
 
         <!-- first loop through and make sure all the entries are valid  -->
-        <iterate list-name="parameters.acctgTransEntries" entry-name="acctgTransEntry">
+        <iterate list="parameters.acctgTransEntries" entry="acctgTransEntry">
             <!-- the organization party must be an internal organization -->
-            <entity-one entity-name="PartyRole" value-name="partyRole" use-cache="true" auto-field-map="false">
-                <field-map field-name="partyId" env-name="acctgTransEntry.organizationPartyId"/>
+            <entity-one entity-name="PartyRole" value-field="partyRole" use-cache="true" auto-field-map="false">
+                <field-map field-name="partyId" from-field="acctgTransEntry.organizationPartyId"/>
                 <field-map field-name="roleTypeId" value="INTERNAL_ORGANIZATIO"/>
             </entity-one>
             <if-empty field="partyRole">
@@ -318,7 +318,7 @@
             <else>
             <set field="partyAccountingPreferencesCallMap.organizationPartyId" from-field="acctgTransEntry.organizationPartyId"/>
             <call-service service-name="getPartyAccountingPreferences" in-map-name="partyAccountingPreferencesCallMap">
-                 <result-to-field result-name="partyAccountingPreference" field-name="partyAcctgPreference"/>
+                 <result-to-field result-name="partyAccountingPreference" field="partyAcctgPreference"/>
             </call-service>
                 <if-empty field="partyAcctgPreference">
                     <log level="warning" message="The internal organization with id [${acctgTransEntry.organizationPartyId}] has no PartyAcctgPreference setting; the following accounting transaction will be ignored: ${acctgTransEntry}"/>
@@ -332,13 +332,13 @@
                             </if-empty>
                             <set field="acctgTransEntry.currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
                             <if-compare-field field="acctgTransEntry.origCurrencyUomId" to-field="acctgTransEntry.currencyUomId" operator="not-equals">
-                                <clear-field field-name="convertUomInMap"/>
+                                <clear-field field="convertUomInMap"/>
                                 <set field="convertUomInMap.originalValue" from-field="acctgTransEntry.origAmount" type="Double"/>
                                 <set field="convertUomInMap.uomId" from-field="acctgTransEntry.origCurrencyUomId"/>
                                 <set field="convertUomInMap.uomIdTo" from-field="acctgTransEntry.currencyUomId"/>
                                 <!-- TODO: set the optional asOfDate input parameter -->
                                 <call-service service-name="convertUom" in-map-name="convertUomInMap">
-                                    <result-to-field result-name="convertedValue" field-name="acctgTransEntry.amount"/>
+                                    <result-to-field result-name="convertedValue" field="acctgTransEntry.amount"/>
                                 </call-service>
                             <else>
                                 <set field="acctgTransEntry.amount" from-field="acctgTransEntry.origAmount"/>
@@ -349,7 +349,7 @@
                     <!-- if the glAccountId is empty, but we have a glAccountTypeId, then we will determine the
                          correct glAccountId from the gl setup settings -->
                     <if-empty field="acctgTransEntry.glAccountId">
-                        <clear-field field-name="getGlAccountFromAccountTypeInMap"/>
+                        <clear-field field="getGlAccountFromAccountTypeInMap"/>
                         <set field="getGlAccountFromAccountTypeInMap.organizationPartyId" from-field="acctgTransEntry.organizationPartyId"/>
                         <set field="getGlAccountFromAccountTypeInMap.acctgTransTypeId" from-field="parameters.acctgTransTypeId"/>
                         <set field="getGlAccountFromAccountTypeInMap.glAccountTypeId" from-field="acctgTransEntry.glAccountTypeId"/>
@@ -360,17 +360,17 @@
                         <set field="getGlAccountFromAccountTypeInMap.invoiceId" from-field="parameters.invoiceId"/>
                         <set field="getGlAccountFromAccountTypeInMap.paymentId" from-field="parameters.paymentId"/>
                         <call-service service-name="getGlAccountFromAccountType" in-map-name="getGlAccountFromAccountTypeInMap">
-                            <result-to-field result-name="glAccountId" field-name="acctgTransEntry.glAccountId"/>
+                            <result-to-field result-name="glAccountId" field="acctgTransEntry.glAccountId"/>
                         </call-service>
                     </if-empty>
                     <if-empty field="acctgTransEntry.origAmount">
                         <set field="acctgTransEntry.origAmount" from-field="acctgTransEntry.amount"/>
                     </if-empty>
-                    <entity-one entity-name="GlAccountType" value-name="glAccountType" use-cache="true" auto-field-map="false">
-                        <field-map field-name="glAccountTypeId" env-name="acctgTransEntry.glAccountTypeId"/>
+                    <entity-one entity-name="GlAccountType" value-field="glAccountType" use-cache="true" auto-field-map="false">
+                        <field-map field-name="glAccountTypeId" from-field="acctgTransEntry.glAccountTypeId"/>
                     </entity-one>
                     <if-empty field="glAccountType">
-                        <clear-field field-name="acctgTransEntry.glAccountTypeId"/>
+                        <clear-field field="acctgTransEntry.glAccountTypeId"/>
                     </if-empty>
                     <set field="normalizedAcctgTransEntries[]" from-field="acctgTransEntry"/>
                 </else>
@@ -381,24 +381,24 @@
 
         <if-not-empty field="normalizedAcctgTransEntries">
             <!-- now do the posting. First, create the AcctgTrans entity -->
-            <set-service-fields service-name="createAcctgTrans" map-name="parameters" to-map-name="createAcctgTransParams"/>
+            <set-service-fields service-name="createAcctgTrans" map="parameters" to-map="createAcctgTransParams"/>
             <if-empty field="createAcctgTransParams.transactionDate">
-                <now-timestamp-to-env env-name="createAcctgTransParams.transactionDate"/>
+                <now-timestamp field="createAcctgTransParams.transactionDate"/>
             </if-empty>
             <call-service service-name="createAcctgTrans" in-map-name="createAcctgTransParams">
                 <result-to-field result-name="acctgTransId"/>
             </call-service>
 
             <!-- Next, create the AcctgTransEntry entities one by one -->
-            <iterate list-name="normalizedAcctgTransEntries" entry-name="acctgTransEntry">
+            <iterate list="normalizedAcctgTransEntries" entry="acctgTransEntry">
                 <!-- if any amount is negative, then get the absolute (positive) value of that amount, and flip the Debit/Credit flag  -->
                 <if-compare field="acctgTransEntry.origAmount" operator="less" value="0">
                     <log level="verbose" message="${acctgTransEntry} is going to get inverted"/>
-                    <calculate field-name="acctgTransEntry.origAmount">
-                        <calcop field-name="acctgTransEntry.origAmount" operator="negative"/>
+                    <calculate field="acctgTransEntry.origAmount">
+                        <calcop field="acctgTransEntry.origAmount" operator="negative"/>
                     </calculate>
-                    <calculate field-name="acctgTransEntry.amount">
-                        <calcop field-name="acctgTransEntry.amount" operator="negative"/>
+                    <calculate field="acctgTransEntry.amount">
+                        <calcop field="acctgTransEntry.amount" operator="negative"/>
                     </calculate>
                     <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
                         <set value="C" field="acctgTransEntry.debitCreditFlag"/>
@@ -411,8 +411,8 @@
                 </if-compare>
 
                 <!-- now create the AcctgTransEntry using the acctgTransId we already have from above -->
-                <clear-field field-name="createAcctgTransEntryParams"/>
-                <set-service-fields service-name="createAcctgTransEntry" map-name="acctgTransEntry" to-map-name="createAcctgTransEntryParams"/>
+                <clear-field field="createAcctgTransEntryParams"/>
+                <set-service-fields service-name="createAcctgTransEntry" map="acctgTransEntry" to-map="createAcctgTransEntryParams"/>
                 <set from-field="acctgTransId" field="createAcctgTransEntryParams.acctgTransId"/>
                 <call-service service-name="createAcctgTransEntry" in-map-name="createAcctgTransEntryParams"/>
             </iterate>
@@ -422,7 +422,7 @@
         </if-not-empty>
         
         <!-- all done -->
-        <field-to-result field-name="acctgTransId"/>
+        <field-to-result field="acctgTransId"/>
     </simple-method>
 
     <!-- Miscellaneous services for product and inventory -->
@@ -432,7 +432,7 @@
         <if-compare field="parameters.acctgTransTypeId" operator="equals" value="ITEM_VARIANCE">
             <call-simple-method method-name="getVarianceReasonGlAccountInline"/>
             <if-not-empty field="varianceReasonGlAccount.glAccountId">
-                <field-to-result field-name="varianceReasonGlAccount.glAccountId" result-name="glAccountId"/>
+                <field-to-result field="varianceReasonGlAccount.glAccountId" result-name="glAccountId"/>
                 <return/>
             </if-not-empty>
         </if-compare>
@@ -448,7 +448,7 @@
             <then>
                 <call-simple-method method-name="getPartyGlAccountInline"/>
                 <if-not-empty field="partyGlAccount.glAccountId">
-                    <field-to-result field-name="partyGlAccount.glAccountId" result-name="glAccountId"/>
+                    <field-to-result field="partyGlAccount.glAccountId" result-name="glAccountId"/>
                     <return/>
                 </if-not-empty>
             </then>
@@ -470,23 +470,23 @@
                 </and>
             </condition>
             <then>
-                <entity-one entity-name="Payment" value-name="payment"/>
-                <get-related-one value-name="payment" relation-name="PaymentMethod" to-value-name="paymentMethod"/>
+                <entity-one entity-name="Payment" value-field="payment"/>
+                <get-related-one value-field="payment" relation-name="PaymentMethod" to-value-field="paymentMethod"/>
                 <if-not-empty field="paymentMethod.glAccountId">
-                    <field-to-result field-name="paymentMethod.glAccountId" result-name="glAccountId"/>
+                    <field-to-result field="paymentMethod.glAccountId" result-name="glAccountId"/>
                     <return/>
                 </if-not-empty>
                 <if-compare field="payment.paymentMethodTypeId" operator="equals" value="CREDIT_CARD">
-                    <get-related-one value-name="payment" relation-name="CreditCard" to-value-name="creditCard"/>
+                    <get-related-one value-field="payment" relation-name="CreditCard" to-value-field="creditCard"/>
                     <call-simple-method method-name="getCreditCardTypeGlAccountInline"/>
                     <if-not-empty field="creditCardTypeGlAccount.glAccountId">
-                        <field-to-result field-name="creditCardTypeGlAccount.glAccountId" result-name="glAccountId"/>
+                        <field-to-result field="creditCardTypeGlAccount.glAccountId" result-name="glAccountId"/>
                         <return/>
                     </if-not-empty>
                 </if-compare>
                 <call-simple-method method-name="getPaymentMethodTypeGlAccountInline"/>
                 <if-not-empty field="paymentMethodTypeGlAccount.glAccountId">
-                    <field-to-result field-name="paymentMethodTypeGlAccount.glAccountId" result-name="glAccountId"/>
+                    <field-to-result field="paymentMethodTypeGlAccount.glAccountId" result-name="glAccountId"/>
                     <return/>
                 </if-not-empty>
                 <return/>
@@ -496,14 +496,14 @@
             <call-simple-method method-name="getProductGlAccountInline"/>
             <!-- if nothing found look if the parameters.productId is member of any ProductCategory in ProductCategoryGlAccount -->
             <if-empty field="productGlAccount.glAccountId">
-                <entity-and entity-name="ProductCategoryMember" list-name="productCategoryMembers" filter-by-date="true">
-                    <field-map field-name="productId" env-name="parameters.productId"/>
+                <entity-and entity-name="ProductCategoryMember" list="productCategoryMembers" filter-by-date="true">
+                    <field-map field-name="productId" from-field="parameters.productId"/>
                     <order-by field-name="-fromDate"/>
                 </entity-and>
-                <iterate list-name="productCategoryMembers" entry-name="productCategoryMember">
+                <iterate list="productCategoryMembers" entry="productCategoryMember">
                     <call-simple-method method-name="getProductCategoryGlAccountInline"/>
                     <if-not-empty field="productCategoryGlAccount.glAccountId">
-                        <field-to-result field-name="productCategoryGlAccount.glAccountId" result-name="glAccountId"/>
+                        <field-to-result field="productCategoryGlAccount.glAccountId" result-name="glAccountId"/>
                         <return/>
                     </if-not-empty>
                 </iterate>
@@ -544,20 +544,20 @@
                     </else>
                     </if-compare>
                     <if-not-empty field="glAccountTypeDefault.glAccountId">
-                        <field-to-result field-name="glAccountTypeDefault.glAccountId" result-name="glAccountId"/>
+                        <field-to-result field="glAccountTypeDefault.glAccountId" result-name="glAccountId"/>
                         <return/>
                     </if-not-empty>
                 </if-not-empty>
                 <call-simple-method method-name="getInvoiceItemTypeGlAccountInline"/>
                 <if-not-empty field="invoiceItemTypeGlAccount.glAccountId">
-                    <field-to-result field-name="invoiceItemTypeGlAccount.glAccountId" result-name="glAccountId"/>
+                    <field-to-result field="invoiceItemTypeGlAccount.glAccountId" result-name="glAccountId"/>
                     <return/>
                 </if-not-empty>
-                <entity-one entity-name="InvoiceItemType" value-name="invoiceItemType">
-                    <field-map field-name="invoiceItemTypeId" env-name="parameters.glAccountTypeId"/>
+                <entity-one entity-name="InvoiceItemType" value-field="invoiceItemType">
+                    <field-map field-name="invoiceItemTypeId" from-field="parameters.glAccountTypeId"/>
                 </entity-one>
                 <if-not-empty field="invoiceItemType.defaultGlAccountId">
-                    <field-to-result field-name="invoiceItemType.defaultGlAccountId" result-name="glAccountId"/>
+                    <field-to-result field="invoiceItemType.defaultGlAccountId" result-name="glAccountId"/>
                     <return/>
                 </if-not-empty>
                 <return/>
@@ -567,25 +567,25 @@
         <if-empty field="lookedUpValue.glAccountId">
             <call-simple-method method-name="getGlAccountTypeDefaultInline"/>
         </if-empty>
-        <field-to-result field-name="lookedUpValue.glAccountId" result-name="glAccountId"/>
+        <field-to-result field="lookedUpValue.glAccountId" result-name="glAccountId"/>
     </simple-method>
 
     <simple-method method-name="getInventoryItemOwner" short-description="Get an ownerPartyId from inventoryItemId">
-        <entity-one entity-name="InventoryItem" value-name="inventoryItem"/>
+        <entity-one entity-name="InventoryItem" value-field="inventoryItem"/>
         <if-empty field="inventoryItem.ownerPartyId">
-            <get-related-one value-name="inventoryItem" relation-name="Facility" to-value-name="facility"/>
-            <field-to-result field-name="facility.ownerPartyId" result-name="ownerPartyId"/>
+            <get-related-one value-field="inventoryItem" relation-name="Facility" to-value-field="facility"/>
+            <field-to-result field="facility.ownerPartyId" result-name="ownerPartyId"/>
         <else>
-            <field-to-result field-name="inventoryItem.ownerPartyId" result-name="ownerPartyId"/>
+            <field-to-result field="inventoryItem.ownerPartyId" result-name="ownerPartyId"/>
         </else>
         </if-empty>
     </simple-method>
 
     <simple-method method-name="closeFinancialTimePeriod" short-description="Close a financial CustomTimePeriod">
-        <entity-one entity-name="CustomTimePeriod" value-name="customTimePeriod"/>
+        <entity-one entity-name="CustomTimePeriod" value-field="customTimePeriod"/>
         <set field="openTimePeriodCondition.isClosed" value="N"/>
-        <get-related value-name="customTimePeriod" relation-name="ChildCustomTimePeriod" list-name="openChildTimePeriods" map-name="openTimePeriodCondition"/>
-        <iterate list-name="openChildTimePeriods" entry-name="openChildTimePeriod">
+        <get-related value-field="customTimePeriod" relation-name="ChildCustomTimePeriod" list="openChildTimePeriods" map="openTimePeriodCondition"/>
+        <iterate list="openChildTimePeriods" entry="openChildTimePeriod">
             <add-error><fail-message message="Cannot close time period [${customTimePeriod.customTimePeriodId}] because the child time period ${openChildTimePeriod.periodName} [${openChildTimePeriod.customTimePeriodId}] is not closed."/></add-error>
         </iterate>
         <check-errors/>
@@ -600,72 +600,72 @@
             <add-error><fail-message message="Unable to find a last closed date for time period [${customTimePeriod.customTimePeriodId}] of type [${customTimePeriod.customTimePeriodId}] for organization [${customTimePeriod.organizationPartyId}]"/></add-error>
         </if-empty>
         <check-errors/>
-        <entity-one entity-name="GlAccountClass" value-name="expenseGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="expenseGlAccountClass">
             <field-map field-name="glAccountClassId" value="EXPENSE"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="expenseAccountClassIds">
-            <field field-name="expenseGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="expenseAccountClassIds">
+            <field field="expenseGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="revenueGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="revenueGlAccountClass">
             <field-map field-name="glAccountClassId" value="REVENUE"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="revenueAccountClassIds">
-            <field field-name="revenueGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="revenueAccountClassIds">
+            <field field="revenueGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="incomeGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="incomeGlAccountClass">
             <field-map field-name="glAccountClassId" value="INCOME"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="incomeAccountClassIds">
-            <field field-name="incomeGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="incomeAccountClassIds">
+            <field field="incomeGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="assetGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="assetGlAccountClass">
             <field-map field-name="glAccountClassId" value="ASSET"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="assetAccountClassIds">
-            <field field-name="assetGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="assetAccountClassIds">
+            <field field="assetGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="liabilityGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="liabilityGlAccountClass">
             <field-map field-name="glAccountClassId" value="LIABILITY"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="liabilityAccountClassIds">
-            <field field-name="liabilityGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="liabilityAccountClassIds">
+            <field field="liabilityGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="equityGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="equityGlAccountClass">
             <field-map field-name="glAccountClassId" value="EQUITY"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="equityAccountClassIds">
-            <field field-name="equityGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="equityAccountClassIds">
+            <field field="equityGlAccountClass" type="GenericValue"/>
         </call-class-method>
         
         <!-- Compute the total posted amount of the period -->
-        <entity-condition entity-name="AcctgTransAndEntries" list-name="acctgTransAndEntries">
+        <entity-condition entity-name="AcctgTransAndEntries" list="acctgTransAndEntries">
             <condition-list combine="and">
-                <condition-expr field-name="organizationPartyId" operator="equals" env-name="customTimePeriod.organizationPartyId"/>
+                <condition-expr field-name="organizationPartyId" operator="equals" from-field="customTimePeriod.organizationPartyId"/>
                 <condition-expr field-name="isPosted" operator="equals" value="Y"/>
                 <condition-expr field-name="glFiscalTypeId" operator="equals" value="ACTUAL"/>
-                <condition-expr field-name="transactionDate" operator="greater-equals" env-name="lastClosedDate"/>
-                <condition-expr field-name="transactionDate" operator="less" env-name="customTimePeriod.thruDate"/> <!-- FIXME: Date to Timestamp -->
+                <condition-expr field-name="transactionDate" operator="greater-equals" from-field="lastClosedDate"/>
+                <condition-expr field-name="transactionDate" operator="less" from-field="customTimePeriod.thruDate"/> <!-- FIXME: Date to Timestamp -->
                 <condition-expr field-name="acctgTransTypeId" operator="not-equals" value="PERIOD_CLOSING"/>
                 <condition-list combine="or">
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="expenseAccountClassIds"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="revenueAccountClassIds"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="incomeAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="expenseAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="revenueAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="incomeAccountClassIds"/>
                 </condition-list>
             </condition-list>
             <order-by field-name="acctgTransId"/>
             <order-by field-name="acctgTransEntrySeqId"/>
         </entity-condition>
         <set field="totalAmount" value="0.0" type="Double"/>
-        <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
-            <get-related-one value-name="acctgTransAndEntry" relation-name="GlAccount" to-value-name="glAccount"/>
-            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field-name="isCreditAccount">
-                <field field-name="glAccount" type="GenericValue"/>
+        <iterate list="acctgTransAndEntries" entry="acctgTransAndEntry">
+            <get-related-one value-field="acctgTransAndEntry" relation-name="GlAccount" to-value-field="glAccount"/>
+            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field="isCreditAccount">
+                <field field="glAccount" type="GenericValue"/>
             </call-class-method>
-            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isDebitAccount" ret-field-name="isDebitAccount">
-                <field field-name="glAccount" type="GenericValue"/>
+            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isDebitAccount" ret-field="isDebitAccount">
+                <field field="glAccount" type="GenericValue"/>
             </call-class-method>
-            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field-name="isExpenseAccount">
-                <field field-name="glAccount" type="GenericValue"/>
+            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field="isExpenseAccount">
+                <field field="glAccount" type="GenericValue"/>
             </call-class-method>
             <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
             <if>
@@ -682,52 +682,52 @@
                     </or>
                 </condition>
                 <then>
-                    <calculate field-name="amount">
-                        <calcop field-name="amount" operator="negative"/>
+                    <calculate field="amount">
+                        <calcop field="amount" operator="negative"/>
                     </calculate>
                 </then>
             </if>
             <if-compare field="isExpenseAccount" operator="equals" value="true" type="Boolean">
-                <calculate field-name="amount">
-                    <calcop field-name="amount" operator="negative"/>
+                <calculate field="amount">
+                    <calcop field="amount" operator="negative"/>
                 </calculate>
             </if-compare>
-            <calculate field-name="totalAmount" type="Double">
-                <calcop field-name="totalAmount" operator="add"><calcop field-name="amount" operator="get"/></calcop>
+            <calculate field="totalAmount" type="Double">
+                <calcop field="totalAmount" operator="add"><calcop field="amount" operator="get"/></calcop>
             </calculate>
         </iterate>
         <set field="partyAccountingPreferencesCallMap.organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
         <call-service service-name="getPartyAccountingPreferences" in-map-name="partyAccountingPreferencesCallMap">
-             <result-to-field result-name="partyAccountingPreference" field-name="partyAcctgPreference"/>
+             <result-to-field result-name="partyAccountingPreference" field="partyAcctgPreference"/>
         </call-service>
         <!-- get the profit and loss gl account id -->
-        <entity-one entity-name="GlAccountTypeDefault" value-name="profitLossAccount" use-cache="true">
-            <field-map field-name="organizationPartyId" env-name="customTimePeriod.organizationPartyId"/>
+        <entity-one entity-name="GlAccountTypeDefault" value-field="profitLossAccount" use-cache="true">
+            <field-map field-name="organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
             <field-map field-name="glAccountTypeId" value="PROFIT_LOSS_ACCOUNT"/>
         </entity-one>
-        <entity-one entity-name="GlAccountHistory" value-name="profitLossAccountHistory">
-            <field-map field-name="organizationPartyId" env-name="customTimePeriod.organizationPartyId"/>
-            <field-map field-name="customTimePeriodId" env-name="customTimePeriod.customTimePeriodId"/>
-            <field-map field-name="glAccountId" env-name="profitLossAccount.glAccountId"/>
+        <entity-one entity-name="GlAccountHistory" value-field="profitLossAccountHistory">
+            <field-map field-name="organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
+            <field-map field-name="customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/>
+            <field-map field-name="glAccountId" from-field="profitLossAccount.glAccountId"/>
         </entity-one>
         <if-not-empty field="profitLossAccountHistory">
             <!-- already posted: verify if numbers match -->
-            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getNetBalance" ret-field-name="postedBalance">
-                <field field-name="profitLossAccountHistory" type="GenericValue"/>
+            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getNetBalance" ret-field="postedBalance">
+                <field field="profitLossAccountHistory" type="GenericValue"/>
             </call-class-method>
             <if-compare-field field="postedBalance" to-field="totalAmount" operator="not-equals" type="Double">
                 <add-error><fail-message message="There is already a posted balance [${postedBalance}] that doesn't match with the current one [${totalAmount}]."/></add-error>
             </if-compare-field>
             <check-errors/>
         <else>
-            <make-value entity-name="AcctgTransEntry" value-name="creditEntry"/>
+            <make-value entity-name="AcctgTransEntry" value-field="creditEntry"/>
             <set field="creditEntry.debitCreditFlag" value="C"/>
             <set field="creditEntry.glAccountTypeId" value="RETAINED_EARNINGS"/>
             <set field="creditEntry.organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
             <set field="creditEntry.origAmount" from-field="totalAmount"/>
             <set field="creditEntry.origCurrencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
             <set field="acctgTransEntries[]" from-field="creditEntry" type="Object"/>
-            <make-value entity-name="AcctgTransEntry" value-name="debitEntry"/>
+            <make-value entity-name="AcctgTransEntry" value-field="debitEntry"/>
             <set field="debitEntry.debitCreditFlag" value="D"/>
             <set field="debitEntry.glAccountTypeId" value="PROFIT_LOSS_ACCOUNT"/>
             <set field="debitEntry.organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
@@ -745,78 +745,78 @@
             </call-service>
         </else>
         </if-not-empty>
-        <entity-and entity-name="GlAccountHistory" list-name="glAccountHistories">
-            <field-map field-name="organizationPartyId" env-name="customTimePeriod.organizationPartyId"/>
-            <field-map field-name="customTimePeriodId" env-name="customTimePeriod.customTimePeriodId"/>
+        <entity-and entity-name="GlAccountHistory" list="glAccountHistories">
+            <field-map field-name="organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
+            <field-map field-name="customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/>
         </entity-and>
-        <iterate list-name="glAccountHistories" entry-name="glAccountHistory">
-            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getNetBalance" ret-field-name="endingBalance">
-                <field field-name="glAccountHistory" type="GenericValue"/>
+        <iterate list="glAccountHistories" entry="glAccountHistory">
+            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getNetBalance" ret-field="endingBalance">
+                <field field="glAccountHistory" type="GenericValue"/>
             </call-class-method>
             <set field="glAccountHistory.endingBalance" from-field="endingBalance" type="Double"/>
-            <store-value value-name="glAccountHistory"/>
+            <store-value value-field="glAccountHistory"/>
         </iterate>
         <if-not-empty field="lastClosedTimePeriod">
-            <entity-condition entity-name="GlAccountAndHistory" list-name="lastPeriodGlAccountAndHistories">
+            <entity-condition entity-name="GlAccountAndHistory" list="lastPeriodGlAccountAndHistories">
                 <condition-list combine="and">
-                    <condition-expr field-name="organizationPartyId" operator="equals" env-name="customTimePeriod.organizationPartyId"/>
-                    <condition-expr field-name="customTimePeriodId" operator="equals" env-name="lastClosedTimePeriod.customTimePeriodId"/>
+                    <condition-expr field-name="organizationPartyId" operator="equals" from-field="customTimePeriod.organizationPartyId"/>
+                    <condition-expr field-name="customTimePeriodId" operator="equals" from-field="lastClosedTimePeriod.customTimePeriodId"/>
                     <condition-list combine="or">
-                        <condition-expr field-name="glAccountClassId" operator="in" env-name="assetAccountClassIds"/>
-                        <condition-expr field-name="glAccountClassId" operator="in" env-name="liabilityAccountClassIds"/>
-                        <condition-expr field-name="glAccountClassId" operator="in" env-name="equityAccountClassIds"/>
+                        <condition-expr field-name="glAccountClassId" operator="in" from-field="assetAccountClassIds"/>
+                        <condition-expr field-name="glAccountClassId" operator="in" from-field="liabilityAccountClassIds"/>
+                        <condition-expr field-name="glAccountClassId" operator="in" from-field="equityAccountClassIds"/>
                     </condition-list>
                 </condition-list>
                 <order-by field-name="glAccountId"/>
             </entity-condition>
-            <iterate list-name="lastPeriodGlAccountAndHistories" entry-name="lastPeriodGlAccountAndHistory">
-                <get-related-one value-name="lastPeriodGlAccountAndHistory" relation-name="GlAccountHistory" to-value-name="lastPeriodGlAccountHistory"/>
-                <entity-one entity-name="GlAccountHistory" value-name="thisPeriodGlAccountHistory" auto-field-map="false">
-                    <field-map field-name="organizationPartyId" env-name="customTimePeriod.organizationPartyId"/>
-                    <field-map field-name="customTimePeriodId" env-name="customTimePeriod.customTimePeriodId"/>
-                    <field-map field-name="glAccountId" env-name="lastPeriodGlAccountHistory.glAccountId"/>
+            <iterate list="lastPeriodGlAccountAndHistories" entry="lastPeriodGlAccountAndHistory">
+                <get-related-one value-field="lastPeriodGlAccountAndHistory" relation-name="GlAccountHistory" to-value-field="lastPeriodGlAccountHistory"/>
+                <entity-one entity-name="GlAccountHistory" value-field="thisPeriodGlAccountHistory" auto-field-map="false">
+                    <field-map field-name="organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
+                    <field-map field-name="customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/>
+                    <field-map field-name="glAccountId" from-field="lastPeriodGlAccountHistory.glAccountId"/>
                 </entity-one>
                 <if-empty field="thisPeriodGlAccountHistory">
-                    <make-value entity-name="GlAccountHistory" value-name="thisPeriodGlAccountHistory"/>
+                    <make-value entity-name="GlAccountHistory" value-field="thisPeriodGlAccountHistory"/>
                     <set field="thisPeriodGlAccountHistory.customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/>
                     <set field="thisPeriodGlAccountHistory.organizationPartyId" from-field="customTimePeriod.organizationPartyId"/>
                     <set field="thisPeriodGlAccountHistory.glAccountId" from-field="lastPeriodGlAccountHistory.glAccountId"/>
                     <set field="thisPeriodGlAccountHistory.postedDebits" value="0.0" type="Double"/>
                     <set field="thisPeriodGlAccountHistory.postedCredits" value="0.0" type="Double"/>
                     <set field="thisPeriodGlAccountHistory.endingBalance" from-field="lastPeriodGlAccountHistory.endingBalance" type="Double"/>
-                    <create-value value-name="thisPeriodGlAccountHistory"/>
+                    <create-value value-field="thisPeriodGlAccountHistory"/>
                 <else>
-                    <calculate field-name="thisPeriodGlAccountHistory.endingBalance" type="Double">
-                        <calcop field-name="thisPeriodGlAccountHistory.endingBalance" operator="add"><calcop field-name="lastPeriodGlAccountHistory.endingBalance" operator="get"/></calcop>
+                    <calculate field="thisPeriodGlAccountHistory.endingBalance" type="Double">
+                        <calcop field="thisPeriodGlAccountHistory.endingBalance" operator="add"><calcop field="lastPeriodGlAccountHistory.endingBalance" operator="get"/></calcop>
                     </calculate>
-                    <store-value value-name="thisPeriodGlAccountHistory"/>
+                    <store-value value-field="thisPeriodGlAccountHistory"/>
                 </else>
                 </if-empty>
             </iterate>
         </if-not-empty>
 
         <!-- Initialize the accounts for the new fiscal period -->
-        <entity-condition entity-name="GlAccountOrganizationAndClass" list-name="glAccountOrganizationAndClassList">
+        <entity-condition entity-name="GlAccountOrganizationAndClass" list="glAccountOrganizationAndClassList">
             <condition-list combine="and">
-                <condition-expr field-name="organizationPartyId" operator="equals" env-name="customTimePeriod.organizationPartyId"/>
+                <condition-expr field-name="organizationPartyId" operator="equals" from-field="customTimePeriod.organizationPartyId"/>
                 <condition-expr field-name="postedBalance" operator="not-equals" value="0.0"/>
                 <condition-list combine="or">
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="expenseAccountClassIds"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="revenueAccountClassIds"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="incomeAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="expenseAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="revenueAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="incomeAccountClassIds"/>
                 </condition-list>
             </condition-list>
         </entity-condition>
-        <now-timestamp-to-env env-name="nowTimestamp"/>
-        <iterate list-name="glAccountOrganizationAndClassList" entry-name="glAccountOrganizationAndClass">
-            <entity-condition entity-name="AcctgTransAndEntries" list-name="acctgTransAndEntries">
+        <now-timestamp field="nowTimestamp"/>
+        <iterate list="glAccountOrganizationAndClassList" entry="glAccountOrganizationAndClass">
+            <entity-condition entity-name="AcctgTransAndEntries" list="acctgTransAndEntries">
                 <condition-list combine="and">
-                    <condition-expr field-name="organizationPartyId" operator="equals" env-name="customTimePeriod.organizationPartyId"/>
-                    <condition-expr field-name="glAccountId" operator="equals" env-name="glAccountOrganizationAndClass.glAccountId"/>
+                    <condition-expr field-name="organizationPartyId" operator="equals" from-field="customTimePeriod.organizationPartyId"/>
+                    <condition-expr field-name="glAccountId" operator="equals" from-field="glAccountOrganizationAndClass.glAccountId"/>
                     <condition-expr field-name="isPosted" operator="equals" value="Y"/>
                     <condition-expr field-name="glFiscalTypeId" operator="equals" value="ACTUAL"/>
-                    <condition-expr field-name="transactionDate" operator="greater-equals" env-name="customTimePeriod.thruDate"/> <!-- FIXME: Date to Timestamp -->
-                    <condition-expr field-name="transactionDate" operator="less" env-name="nowTimestamp"/>
+                    <condition-expr field-name="transactionDate" operator="greater-equals" from-field="customTimePeriod.thruDate"/> <!-- FIXME: Date to Timestamp -->
+                    <condition-expr field-name="transactionDate" operator="less" from-field="nowTimestamp"/>
                     <condition-expr field-name="acctgTransTypeId" operator="not-equals" value="PERIOD_CLOSING"/>
                 </condition-list>
                 <order-by field-name="acctgTransId"/>
@@ -824,16 +824,16 @@
             </entity-condition>
 
             <set field="newPostedBalance" value="0.0" type="Double"/>
-            <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
-                <get-related-one value-name="acctgTransAndEntry" relation-name="GlAccount" to-value-name="glAccount"/>
-                <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field-name="isCreditAccount">
-                    <field field-name="glAccount" type="GenericValue"/>
+            <iterate list="acctgTransAndEntries" entry="acctgTransAndEntry">
+                <get-related-one value-field="acctgTransAndEntry" relation-name="GlAccount" to-value-field="glAccount"/>
+                <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field="isCreditAccount">
+                    <field field="glAccount" type="GenericValue"/>
                 </call-class-method>
-                <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isDebitAccount" ret-field-name="isDebitAccount">
-                    <field field-name="glAccount" type="GenericValue"/>
+                <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isDebitAccount" ret-field="isDebitAccount">
+                    <field field="glAccount" type="GenericValue"/>
                 </call-class-method>
-                <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field-name="isExpenseAccount">
-                    <field field-name="glAccount" type="GenericValue"/>
+                <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field="isExpenseAccount">
+                    <field field="glAccount" type="GenericValue"/>
                 </call-class-method>
                 <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
                 <if>
@@ -850,18 +850,18 @@
                         </or>
                     </condition>
                     <then>
-                        <calculate field-name="amount">
-                            <calcop field-name="amount" operator="negative"/>
+                        <calculate field="amount">
+                            <calcop field="amount" operator="negative"/>
                         </calculate>
                     </then>
                 </if>
                 <if-compare field="isExpenseAccount" operator="equals" value="true" type="Boolean">
-                    <calculate field-name="amount">
-                        <calcop field-name="amount" operator="negative"/>
+                    <calculate field="amount">
+                        <calcop field="amount" operator="negative"/>
                     </calculate>
                 </if-compare>
-                <calculate field-name="newPostedBalance" type="Double">
-                    <calcop field-name="newPostedBalance" operator="add"><calcop field-name="amount" operator="get"/></calcop>
+                <calculate field="newPostedBalance" type="Double">
+                    <calcop field="newPostedBalance" operator="add"><calcop field="amount" operator="get"/></calcop>
                 </calculate>
             </iterate>
 
@@ -878,52 +878,52 @@
     </simple-method>
 
     <simple-method method-name="prepareIncomeStatement" short-description="Prepare data for the Income Statement">
-        <entity-one entity-name="GlAccountClass" value-name="expenseGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="expenseGlAccountClass">
             <field-map field-name="glAccountClassId" value="EXPENSE"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="expenseAccountClassIds">
-            <field field-name="expenseGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="expenseAccountClassIds">
+            <field field="expenseGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="revenueGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="revenueGlAccountClass">
             <field-map field-name="glAccountClassId" value="REVENUE"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="revenueAccountClassIds">
-            <field field-name="revenueGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="revenueAccountClassIds">
+            <field field="revenueGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="incomeGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="incomeGlAccountClass">
             <field-map field-name="glAccountClassId" value="INCOME"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="incomeAccountClassIds">
-            <field field-name="incomeGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="incomeAccountClassIds">
+            <field field="incomeGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-condition entity-name="AcctgTransAndEntries" list-name="acctgTransAndEntries">
+        <entity-condition entity-name="AcctgTransAndEntries" list="acctgTransAndEntries">
             <condition-list combine="and">
-                <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
+                <condition-expr field-name="organizationPartyId" operator="equals" from-field="parameters.organizationPartyId"/>
                 <condition-expr field-name="isPosted" operator="equals" value="Y"/>
-                <condition-expr field-name="glFiscalTypeId" operator="equals" env-name="parameters.glFiscalTypeId"/>
-                <condition-expr field-name="transactionDate" operator="greater-equals" env-name="parameters.fromDate"/>
-                <condition-expr field-name="transactionDate" operator="less" env-name="parameters.thruDate"/> <!-- FIXME: Date to Timestamp -->
+                <condition-expr field-name="glFiscalTypeId" operator="equals" from-field="parameters.glFiscalTypeId"/>
+                <condition-expr field-name="transactionDate" operator="greater-equals" from-field="parameters.fromDate"/>
+                <condition-expr field-name="transactionDate" operator="less" from-field="parameters.thruDate"/> <!-- FIXME: Date to Timestamp -->
                 <condition-expr field-name="acctgTransTypeId" operator="not-equals" value="PERIOD_CLOSING"/>
                 <condition-list combine="or">
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="expenseAccountClassIds"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="revenueAccountClassIds"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="incomeAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="expenseAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="revenueAccountClassIds"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="incomeAccountClassIds"/>
                 </condition-list>
             </condition-list>
             <order-by field-name="acctgTransId"/>
             <order-by field-name="acctgTransEntrySeqId"/>
         </entity-condition>
         <set field="totalNetIncome" value="0.0" type="Double"/>
-        <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
-            <get-related-one value-name="acctgTransAndEntry" relation-name="GlAccount" to-value-name="glAccount"/>
-            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field-name="isCreditAccount">
-                <field field-name="glAccount" type="GenericValue"/>
+        <iterate list="acctgTransAndEntries" entry="acctgTransAndEntry">
+            <get-related-one value-field="acctgTransAndEntry" relation-name="GlAccount" to-value-field="glAccount"/>
+            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isCreditAccount" ret-field="isCreditAccount">
+                <field field="glAccount" type="GenericValue"/>
             </call-class-method>
-            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isDebitAccount" ret-field-name="isDebitAccount">
-                <field field-name="glAccount" type="GenericValue"/>
+            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isDebitAccount" ret-field="isDebitAccount">
+                <field field="glAccount" type="GenericValue"/>
             </call-class-method>
-            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field-name="isExpenseAccount">
-                <field field-name="glAccount" type="GenericValue"/>
+            <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isExpenseAccount" ret-field="isExpenseAccount">
+                <field field="glAccount" type="GenericValue"/>
             </call-class-method>
             <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
             <if>
@@ -940,72 +940,72 @@
                     </or>
                 </condition>
                 <then>
-                    <calculate field-name="amount">
-                        <calcop field-name="amount" operator="negative"/>
+                    <calculate field="amount">
+                        <calcop field="amount" operator="negative"/>
                     </calculate>
                 </then>
             </if>
             <if-compare field="isExpenseAccount" operator="equals" value="true" type="Boolean">
-                <calculate field-name="amount">
-                    <calcop field-name="amount" operator="negative"/>
+                <calculate field="amount">
+                    <calcop field="amount" operator="negative"/>
                 </calculate>
             </if-compare>
-            <calculate field-name="totalNetIncome" type="Double">
-                <calcop field-name="totalNetIncome" operator="add"><calcop field-name="amount" operator="get"/></calcop>
+            <calculate field="totalNetIncome" type="Double">
+                <calcop field="totalNetIncome" operator="add"><calcop field="amount" operator="get"/></calcop>
             </calculate>
             <if-compare field="isExpenseAccount" operator="equals" value="true" type="Boolean">
                 <if-empty field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
                     <set field="glAccountTotalsExpenseMap.${glAccount.glAccountId}" value="0.0" type="Double"/>
                 </if-empty>
-                <calculate field-name="glAccountTotalsExpenseMap.${glAccount.glAccountId}" type="Double">
-                    <calcop field-name="glAccountTotalsExpenseMap.${glAccount.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
+                <calculate field="glAccountTotalsExpenseMap.${glAccount.glAccountId}" type="Double">
+                    <calcop field="glAccountTotalsExpenseMap.${glAccount.glAccountId}" operator="add"><calcop field="amount" operator="get"/></calcop>
                 </calculate>
             <else>
                 <if-empty field="glAccountTotalsProfitMap.${glAccount.glAccountId}">
                     <set field="glAccountTotalsProfitMap.${glAccount.glAccountId}" value="0.0" type="Double"/>
                 </if-empty>
-                <calculate field-name="glAccountTotalsProfitMap.${glAccount.glAccountId}" type="Double">
-                    <calcop field-name="glAccountTotalsProfitMap.${glAccount.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
+                <calculate field="glAccountTotalsProfitMap.${glAccount.glAccountId}" type="Double">
+                    <calcop field="glAccountTotalsProfitMap.${glAccount.glAccountId}" operator="add"><calcop field="amount" operator="get"/></calcop>
                 </calculate>
             </else>
             </if-compare>
         </iterate>
-        <iterate-map map-name="glAccountTotalsProfitMap" key-name="glAccountId" value-name="totalAmount">
-            <clear-field field-name="glAccountTotalMap"/>
+        <iterate-map map="glAccountTotalsProfitMap" key="glAccountId" value="totalAmount">
+            <clear-field field="glAccountTotalMap"/>
             <set field="glAccountTotalMap.glAccountId" from-field="glAccountId"/>
             <set field="glAccountTotalMap.totalAmount" from-field="totalAmount"/>
             <set field="glAccountTotalsList[]" from-field="glAccountTotalMap"/>
         </iterate-map>
-        <iterate-map map-name="glAccountTotalsExpenseMap" key-name="glAccountId" value-name="totalAmount">
-            <clear-field field-name="glAccountTotalMap"/>
+        <iterate-map map="glAccountTotalsExpenseMap" key="glAccountId" value="totalAmount">
+            <clear-field field="glAccountTotalMap"/>
             <set field="glAccountTotalMap.glAccountId" from-field="glAccountId"/>
             <set field="glAccountTotalMap.totalAmount" from-field="totalAmount"/>
             <set field="glAccountTotalsList[]" from-field="glAccountTotalMap"/>
         </iterate-map>
 
-        <field-to-result field-name="totalNetIncome" result-name="totalNetIncome"/>
-        <field-to-result field-name="glAccountTotalsMap" result-name="glAccountTotalsMap"/>
-        <field-to-result field-name="glAccountTotalsList" result-name="glAccountTotalsList"/>
+        <field-to-result field="totalNetIncome" result-name="totalNetIncome"/>
+        <field-to-result field="glAccountTotalsMap" result-name="glAccountTotalsMap"/>
+        <field-to-result field="glAccountTotalsList" result-name="glAccountTotalsList"/>
     </simple-method>
 
     <simple-method method-name="prepareBalanceSheet" short-description="Prepare data for the Balance Sheet">
-        <entity-one entity-name="GlAccountClass" value-name="assetGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="assetGlAccountClass">
             <field-map field-name="glAccountClassId" value="ASSET"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="assetAccountClassIds">
-            <field field-name="assetGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="assetAccountClassIds">
+            <field field="assetGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="liabilityGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="liabilityGlAccountClass">
             <field-map field-name="glAccountClassId" value="LIABILITY"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="liabilityAccountClassIds">
-            <field field-name="liabilityGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="liabilityAccountClassIds">
+            <field field="liabilityGlAccountClass" type="GenericValue"/>
         </call-class-method>
-        <entity-one entity-name="GlAccountClass" value-name="equityGlAccountClass">
+        <entity-one entity-name="GlAccountClass" value-field="equityGlAccountClass">
             <field-map field-name="glAccountClassId" value="EQUITY"/>
         </entity-one>
-        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="equityAccountClassIds">
-            <field field-name="equityGlAccountClass" type="GenericValue"/>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field="equityAccountClassIds">
+            <field field="equityGlAccountClass" type="GenericValue"/>
         </call-class-method>
 
         <!-- retrieve the last closed date for the same type of time period -->
@@ -1021,120 +1021,120 @@
         <check-errors/>
 
         <if-not-empty field="lastClosedTimePeriod">
-            <entity-condition entity-name="GlAccountAndHistory" list-name="glAccountAndHistories">
+            <entity-condition entity-name="GlAccountAndHistory" list="glAccountAndHistories">
                 <condition-list combine="and">
-                    <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
-                    <condition-expr field-name="customTimePeriodId" operator="equals" env-name="lastClosedTimePeriod.customTimePeriodId"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="assetAccountClassIds"/>
+                    <condition-expr field-name="organizationPartyId" operator="equals" from-field="parameters.organizationPartyId"/>
+                    <condition-expr field-name="customTimePeriodId" operator="equals" from-field="lastClosedTimePeriod.customTimePeriodId"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="assetAccountClassIds"/>
                 </condition-list>
                 <order-by field-name="glAccountId"/>
             </entity-condition>
-            <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
+            <iterate list="glAccountAndHistories" entry="glAccountAndHistory">
                 <set field="glAccountTotalsAssetMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance" type="Double"/>
             </iterate>
-            <entity-condition entity-name="GlAccountAndHistory" list-name="glAccountAndHistories">
+            <entity-condition entity-name="GlAccountAndHistory" list="glAccountAndHistories">
                 <condition-list combine="and">
-                    <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
-                    <condition-expr field-name="customTimePeriodId" operator="equals" env-name="lastClosedTimePeriod.customTimePeriodId"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="liabilityAccountClassIds"/>
+                    <condition-expr field-name="organizationPartyId" operator="equals" from-field="parameters.organizationPartyId"/>
+                    <condition-expr field-name="customTimePeriodId" operator="equals" from-field="lastClosedTimePeriod.customTimePeriodId"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="liabilityAccountClassIds"/>
                 </condition-list>
                 <order-by field-name="glAccountId"/>
             </entity-condition>
-            <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
+            <iterate list="glAccountAndHistories" entry="glAccountAndHistory">
                 <set field="glAccountTotalsLiabilityMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance" type="Double"/>
             </iterate>
-            <entity-condition entity-name="GlAccountAndHistory" list-name="glAccountAndHistories">
+            <entity-condition entity-name="GlAccountAndHistory" list="glAccountAndHistories">
                 <condition-list combine="and">
-                    <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
-                    <condition-expr field-name="customTimePeriodId" operator="equals" env-name="lastClosedTimePeriod.customTimePeriodId"/>
-                    <condition-expr field-name="glAccountClassId" operator="in" env-name="equityAccountClassIds"/>
+                    <condition-expr field-name="organizationPartyId" operator="equals" from-field="parameters.organizationPartyId"/>
+                    <condition-expr field-name="customTimePeriodId" operator="equals" from-field="lastClosedTimePeriod.customTimePeriodId"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" from-field="equityAccountClassIds"/>
                 </condition-list>
                 <order-by field-name="glAccountId"/>
             </entity-condition>
-            <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
+            <iterate list="glAccountAndHistories" entry="glAccountAndHistory">

[... 1523 lines stripped ...]