You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2012/04/27 11:14:04 UTC
svn commit: r1331311 - in
/ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting:
ledger/GeneralLedgerServices.xml test/AutoAcctgTransTests.xml
Author: jacopoc
Date: Fri Apr 27 09:14:03 2012
New Revision: 1331311
URL: http://svn.apache.org/viewvc?rev=1331311&view=rev
Log:
Backported 1331308:
Patch from Scott Gray to fix a bug that prevented to post the invoice transaction to the proper "sales" subledger.
Modified:
ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
Modified: ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1331311&r1=1331310&r2=1331311&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original)
+++ ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Fri Apr 27 09:14:03 2012
@@ -598,6 +598,18 @@ under the License.
</and>
</condition>
<then>
+ <call-simple-method method-name="getInvoiceItemTypeGlAccountInline"/>
+ <if-not-empty field="invoiceItemTypeGlAccount.glAccountId">
+ <field-to-result field="invoiceItemTypeGlAccount.glAccountId" result-name="glAccountId"/>
+ <return/>
+ </if-not-empty>
+ <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="invoiceItemType.defaultGlAccountId" result-name="glAccountId"/>
+ <return/>
+ </if-not-empty>
<if-not-empty field="parameters.productId">
<if-compare field="parameters.acctgTransTypeId" operator="equals" value="PURCHASE_INVOICE">
@@ -620,18 +632,6 @@ under the License.
<return/>
</if-not-empty>
</if-not-empty>
- <call-simple-method method-name="getInvoiceItemTypeGlAccountInline"/>
- <if-not-empty field="invoiceItemTypeGlAccount.glAccountId">
- <field-to-result field="invoiceItemTypeGlAccount.glAccountId" result-name="glAccountId"/>
- <return/>
- </if-not-empty>
- <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="invoiceItemType.defaultGlAccountId" result-name="glAccountId"/>
- <return/>
- </if-not-empty>
<return/>
</then>
</if>
Modified: ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml?rev=1331311&r1=1331310&r2=1331311&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml (original)
+++ ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml Fri Apr 27 09:14:03 2012
@@ -318,7 +318,7 @@ under the License.
<assert><not><if-empty field="accountsReceivableEntries"></if-empty></not></assert>
<clear-field field="acctgTransEntryFilter"/>
- <set field="acctgTransEntryFilter.glAccountId" value="400000"/>
+ <set field="acctgTransEntryFilter.glAccountId" value="401000"/>
<filter-list-by-and list="acctgTransEntryList" to-list="salesAccountEntries" map="acctgTransEntryFilter"/>
<assert><not><if-empty field="salesAccountEntries"></if-empty></not></assert>