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

lektran
Author: lektran
Date: Thu Nov 19 04:18:24 2009
New Revision: 882043

URL: http://svn.apache.org/viewvc?rev=882043&view=rev
Log:
When creating gl entries for outgoing payments, get the glAccountId for the credit entry from the PaymentMethodTypeGlAccount record for the given payment.paymentMethodTypeId

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=882043&r1=882042&r2=882043&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 Thu Nov 19 04:18:24 2009
@@ -2240,6 +2240,11 @@
             <set field="creditEntry.debitCreditFlag" value="C"/>
             <!-- TODO -->
             <!--set field="creditEntry.glAccountTypeId" from-field=""/-->
+            <entity-one value-field="paymentMethodTypeGlAccount" entity-name="PaymentMethodTypeGlAccount">
+                <field-map field-name="paymentMethodTypeId" from-field="payment.paymentMethodTypeId"/>
+                <field-map field-name="organizationPartyId"/>
+            </entity-one>
+            <set field="creditEntry.glAccountId" from-field="paymentMethodTypeGlAccount.glAccountId"/>
             <set field="creditEntry.origAmount" from-field="payment.amount"/>
             <set field="creditEntry.origCurrencyUomId" from-field="payment.currencyUomId"/>
             <set field="creditEntry.organizationPartyId" from-field="payment.partyIdFrom"/>