Author: apatel
Date: Wed Nov 28 14:42:44 2007
New Revision: 599175
URL:
http://svn.apache.org/viewvc?rev=599175&view=revLog:
Ashish, thanks for contribution.
Modifed the getProductOrgGlAccount service to also consider the new ProductCategoryGlAccount entity: the information in this file will be considered if no specific mapping for the productId was found in the ProductGlAccount entity and before looking at the general GlAccountTypeDefault entity.
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=599175&r1=599174&r2=599175&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 Nov 28 14:42:44 2007
@@ -421,6 +421,25 @@
<entity-one entity-name="ProductGlAccount" value-name="lookedUpValue" use-cache="true"/>
</then>
</if>
+
+ <!-- if parameters for ProductCategoryGlAccount were passed, then try it this time -->
+ <if-empty field-name="lookedUpValue">
+ <if>
+ <condition>
+ <not>
+ <or>
+ <if-empty field-name="parameters.productCategoryId"/>
+ <if-empty field-name="parameters.organizationPartyId"/>
+ <if-empty field-name="parameters.glAccountTypeId"/>
+ </or>
+ </not>
+ </condition>
+ <then>
+ <entity-one entity-name="ProductCategoryGlAccount" value-name="lookedUpValue" use-cache="true"/>
+ </then>
+ </if>
+ </if-empty>
+
<!-- if nothing found or if no such parameters were passed (lookedUpValue empty in both cases), try GlAccountTypeDefault -->
<if-empty field-name="lookedUpValue.glAccountId">
<entity-one entity-name="GlAccountTypeDefault" value-name="lookedUpValue" use-cache="true"/>