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

jacopoc
Author: jacopoc
Date: Fri Nov 30 06:28:44 2007
New Revision: 599830

URL: http://svn.apache.org/viewvc?rev=599830&view=rev
Log:
Applied last version of the patch from Mridul Pathak (OFBIZ-1437)

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=599830&r1=599829&r2=599830&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 Fri Nov 30 06:28:44 2007
@@ -408,25 +408,21 @@
             <entity-one entity-name="ProductGlAccount" value-name="lookedUpValue" use-cache="true"/>
             <!-- if nothing found look if the parameters.productId is member of any ProductCategory in ProductCategoryGlAccount -->
             <if-empty field-name="lookedUpValue.glAccountId">
-                <entity-and entity-name="ProductCategoryGlAccount" list-name="productCategoryGlAccounts">
-                    <field-map field-name="organizationPartyId" env-name="parameters.organizationPartyId"/>
-                    <field-map field-name="glAccountTypeId" env-name="parameters.glAccountTypeId"/>
+                <entity-and entity-name="ProductCategoryMember" list-name="productCategoryMembers" filter-by-date="true">
+                    <field-map field-name="productId" env-name="parameters.productId"/>
+                    <order-by field-name="-fromDate"/>
                 </entity-and>
-                <if-not-empty field-name="productCategoryGlAccounts">
-                    <iterate list-name="productCategoryGlAccounts" entry-name="productCategoryGlAccount">
-                        <if-not-empty field-name="productCategoryGlAccount.glAccountId">
-                            <entity-and entity-name="ProductCategoryMember" list-name="productCategoryMembers" filter-by-date="true">
-                                <field-map field-name="productCategoryId" env-name="productCategoryGlAccount.productCategoryId"/>
-                                <field-map field-name="productId" env-name="parameters.productId"/>
-                                <order-by field-name="-fromDate"/>
-                            </entity-and>
-                            <if-not-empty field-name="productCategoryMembers">
-                                <field-to-result field-name="productCategoryGlAccount.glAccountId" result-name="glAccountId"/>
-                                <return/>
-                            </if-not-empty>
-                        </if-not-empty>
-                    </iterate>
-                </if-not-empty>
+                <iterate list-name="productCategoryMembers" entry-name="productCategoryMember">
+                    <entity-one entity-name="ProductCategoryGlAccount" value-name="productCategoryGlAccount">
+                        <field-map field-name="productCategoryId" env-name="productCategoryMember.productCategoryId"/>
+                        <field-map field-name="glAccountTypeId" env-name="parameters.glAccountTypeId"/>
+                        <field-map field-name="organizationPartyId" env-name="parameters.organizationPartyId"/>
+                    </entity-one>
+                    <if-not-empty field-name="productCategoryGlAccount.glAccountId">
+                        <field-to-result field-name="productCategoryGlAccount.glAccountId" result-name="glAccountId"/>
+                        <return/>
+                    </if-not-empty>
+                </iterate>
             </if-empty>
         </if-not-empty>