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

jleroux@apache.org
Author: jleroux
Date: Mon Mar 30 15:27:48 2009
New Revision: 760010

URL: http://svn.apache.org/viewvc?rev=760010&view=rev
Log:
This should not be there too. All should be ok now, pfff...

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=760010&r1=760009&r2=760010&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 Mon Mar 30 15:27:48 2009
@@ -1927,14 +1927,7 @@
 
         <entity-one entity-name="Invoice" value-field="invoice"/>
         <if-compare field="invoice.invoiceTypeId" operator="equals" value="PURCHASE_INVOICE">
-            <entity-condition entity-name="InvoiceItem" list="invoiceItems" use-cache="true">
-                <condition-list>
-                    <condition-expr field-name="invoiceItemTypeId" operator="not-equals" value="PINV_SALES_TAX"/>
-                    <condition-expr field-name="invoiceItemTypeId" operator="not-equals" value="PITM_SALES_TAX"/>
-                    <condition-expr field-name="invoiceId" operator="equals" from-field="parameters.invoiceId"/>
-                </condition-list>
-            </entity-condition>
-
+            <get-related value-field="invoice" relation-name="InvoiceItem" list="invoiceItems"/>
             <iterate list="invoiceItems" entry="invoiceItem">
                 <set field="amountFromOrder" type="BigDecimal" value="0"/>
                 <set field="amountFromInvoice" type="BigDecimal" value="0"/>
@@ -2045,13 +2038,9 @@
 
         <entity-one entity-name="Invoice" value-field="invoice"/>
         <if-compare field="invoice.invoiceTypeId" value="SALES_INVOICE" operator="equals">
-            <entity-condition entity-name="InvoiceItem" list="invoiceItems" use-cache="true">
-                <condition-list>
-                    <condition-expr field-name="invoiceItemTypeId" operator="not-equals" value="INV_SALES_TAX"/>
-                    <condition-expr field-name="invoiceItemTypeId" operator="not-equals" value="ITM_SALES_TAX"/>
-                    <condition-expr field-name="invoiceId" operator="equals" from-field="parameters.invoiceId"/>
-                </condition-list>
-            </entity-condition>
+            <entity-and entity-name="InvoiceItem" list="invoiceItems">
+                <field-map field-name="invoiceId" from-field="parameters.invoiceId" />
+            </entity-and>
             <iterate list="invoiceItems" entry="invoiceItem">
                 <!-- TODO: handle serialized inventory -->
                 <if-empty field="invoiceItem.quantity">