svn commit: r794681 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml

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

svn commit: r794681 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml

mor-2
Author: mor
Date: Thu Jul 16 14:04:28 2009
New Revision: 794681

URL: http://svn.apache.org/viewvc?rev=794681&view=rev
Log:
Simplified the code.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml?rev=794681&r1=794680&r2=794681&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml Thu Jul 16 14:04:28 2009
@@ -492,20 +492,18 @@
             <use-iterator/>
         </entity-condition>
 
-        <if-not-empty field="glAccOrgAndAcctgTransAndEntries">
-            <iterate entry="glAccOrgAndAcctgTransAndEntry" list="glAccOrgAndAcctgTransAndEntries">
-                <if-compare field="glAccOrgAndAcctgTransAndEntry.debitCreditFlag" operator="equals" value="D">
-                    <set field="openingDebitTotal" value="${openingDebitTotal + glAccOrgAndAcctgTransAndEntry.totalAmount}" type="BigDecimal" default-value="0"/>
-                <else>
-                    <set field="openingCreditTotal" value="${openingCreditTotal + glAccOrgAndAcctgTransAndEntry.totalAmount}" type="BigDecimal" default-value="0"/>
-                </else>
-                </if-compare>
-            </iterate>
-            <set field="debitCreditDifference" value="${openingDebitTotal - openingCreditTotal}" type="BigDecimal"/>
-        </if-not-empty>
+        <iterate entry="glAccOrgAndAcctgTransAndEntry" list="glAccOrgAndAcctgTransAndEntries">
+            <if-compare field="glAccOrgAndAcctgTransAndEntry.debitCreditFlag" operator="equals" value="D">
+                <set field="openingDebitTotal" value="${openingDebitTotal + glAccOrgAndAcctgTransAndEntry.totalAmount}" type="BigDecimal" default-value="0"/>
+            <else>
+                <set field="openingCreditTotal" value="${openingCreditTotal + glAccOrgAndAcctgTransAndEntry.totalAmount}" type="BigDecimal" default-value="0"/>
+            </else>
+            </if-compare>
+        </iterate>
+        <set field="debitCreditDifference" value="${openingDebitTotal - openingCreditTotal}" type="BigDecimal"/>
+
         <field-to-result field="openingDebitTotal"/>
         <field-to-result field="openingCreditTotal"/>
         <field-to-result field="debitCreditDifference"/>
     </simple-method>
-
-</simple-methods>
+</simple-methods>
\ No newline at end of file