svn commit: r903401 - /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: r903401 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml

lektran
Author: lektran
Date: Tue Jan 26 20:25:28 2010
New Revision: 903401

URL: http://svn.apache.org/viewvc?rev=903401&view=rev
Log:
Added missing TaxAuthorityGlAccount lookup when creating AcctgTransEntry records for sales invoice tax items.

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

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=903401&r1=903400&r2=903401&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 Tue Jan 26 20:25:28 2010
@@ -1925,6 +1925,18 @@
                     <set field="creditEntry.origCurrencyUomId" from-field="invoice.currencyUomId"/>
                     <set field="creditEntry.partyId" from-field="taxAuthPartyId"/>
                     <set field="creditEntry.roleTypeId" value="TAX_AUTHORITY"/>
+                    <clear-field field="taxAuthorityGlAccount"/>
+                    <entity-one entity-name="TaxAuthorityGlAccount" value-field="taxAuthorityGlAccount">
+                        <field-map field-name="organizationPartyId" from-field="creditEntry.organizationPartyId"/>
+                        <field-map field-name="taxAuthGeoId" from-field="taxAuthGeoId"/>
+                        <field-map field-name="taxAuthPartyId" from-field="taxAuthPartyId"/>
+                    </entity-one>
+                    <if-not-empty field="taxAuthorityGlAccount">
+                        <set field="creditEntry.glAccountId" from-field="taxAuthorityGlAccount.glAccountId"/>
+                        <else>
+                            <set field="creditEntry.glAccountTypeId" value="TAX_ACCOUNT"/>
+                        </else>
+                    </if-not-empty>
                     <set field="acctgTransEntries[]" from-field="creditEntry" type="Object"/>
                 </iterate>
             </iterate-map>