Patch from Scott Gray to fix a bug that prevented to post the invoice transaction to the proper "sales" subledger.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1331308 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacopo Cappellato
2012-04-27 09:11:29 +00:00
parent 9a64e92cc3
commit 6d07ddbccd
2 changed files with 13 additions and 13 deletions
@@ -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>
@@ -152,7 +152,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>