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

jacopoc
Author: jacopoc
Date: Wed Jan  9 09:34:57 2008
New Revision: 610476

URL: http://svn.apache.org/viewvc?rev=610476&view=rev
Log:
Changes and fixes to the gl auto posting service: now the generated transaction is posted correctly.

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=610476&r1=610475&r2=610476&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 Jan  9 09:34:57 2008
@@ -2135,15 +2135,15 @@
             <field-map field-name="paymentApplicationId" env-name="parameters.paymentApplicationId"/>
         </entity-one>  
         <get-related-one value-name="paymentApplication" relation-name="Payment" to-value-name="payment"/>
-        <entity-one entity-name="PaymentGlAccountTypeMap" value-name="paymentGlAccountTypeMap">
-            <field-map field-name="paymentTypeId" env-name="payment.paymentTypeId"/>
-            <field-map field-name="organizationPartyId" env-name="payment.partyIdFrom"/>
-        </entity-one>
         <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="isReceipt" ret-field-name="isReceipt">
             <field field-name="payment" type="org.ofbiz.entity.GenericValue"/>
         </call-class-method>
         <if-compare field-name="isReceipt" operator="equals" type="Boolean" value="true">
-        <!--Credit -->
+            <entity-one entity-name="PaymentGlAccountTypeMap" value-name="paymentGlAccountTypeMap">
+                <field-map field-name="paymentTypeId" env-name="payment.paymentTypeId"/>
+                <field-map field-name="organizationPartyId" env-name="payment.partyIdTo"/>
+            </entity-one>
+            <!--Credit -->
             <make-value entity-name="AcctgTransEntry" value-name="debitEntry"/>
             <set field="debitEntry.debitCreditFlag" value="D"/>
             <set field="debitEntry.organizationPartyId" from-field="payment.partyIdTo"/>
@@ -2152,7 +2152,7 @@
             <set field="debitEntry.origAmount" from-field="paymentApplication.amountApplied"/>
             <set field="debitEntry.origCurrencyUomId" from-field="payment.currencyUomId"/>
             <set field="debitEntry.glAccountId" from-field="payment.overrideGlAccountId"/>
-            <set field="debitEntry.glAccountTypeId" from-field="paymentGlAccountTypeMap.glAccountTypeId "/>
+            <set field="debitEntry.glAccountTypeId" from-field="paymentGlAccountTypeMap.glAccountTypeId"/>
             <!-- Debit -->
             <make-value entity-name="AcctgTransEntry" value-name="creditEntry"/>
             <set field="creditEntry.debitCreditFlag" value="C"/>
@@ -2163,6 +2163,10 @@
             <set field="creditEntry.origCurrencyUomId" from-field="payment.currencyUomId"/>
             <set field="creditEntry.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/>
         <else>
+            <entity-one entity-name="PaymentGlAccountTypeMap" value-name="paymentGlAccountTypeMap">
+                <field-map field-name="paymentTypeId" env-name="payment.paymentTypeId"/>
+                <field-map field-name="organizationPartyId" env-name="payment.partyIdFrom"/>
+            </entity-one>
             <!--Credit -->
             <make-value entity-name="AcctgTransEntry" value-name="creditEntry"/>
             <set field="creditEntry.debitCreditFlag" value="C"/>