You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2013/06/16 15:06:05 UTC
svn commit: r1493507 -
/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy
Author: lektran
Date: Sun Jun 16 13:06:04 2013
New Revision: 1493507
URL: http://svn.apache.org/r1493507
Log:
Groovy script cleanup, no functional changes
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy?rev=1493507&r1=1493506&r2=1493507&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy Sun Jun 16 13:06:04 2013
@@ -20,12 +20,8 @@
import org.ofbiz.base.util.UtilMisc;
import javolution.util.FastList;
-taxAuthorityHavingNoGlAccountList = FastList.newInstance();
taxAuthorities = delegator.findList("TaxAuthority", null, null, ["taxAuthGeoId", "taxAuthPartyId"], null, false);
-taxAuthorities.each { taxAuthority ->
- taxAuthorityGlAccount = delegator.findOne("TaxAuthorityGlAccount", [taxAuthGeoId : taxAuthority.taxAuthGeoId, taxAuthPartyId : taxAuthority.taxAuthPartyId, organizationPartyId : organizationPartyId], false);
- if (!taxAuthorityGlAccount) {
- taxAuthorityHavingNoGlAccountList.add(taxAuthority);
- }
+
+context.taxAuthorityHavingNoGlAccountList = taxAuthorities.findAll { taxAuthority ->
+ !taxAuthority.getRelated('TaxAuthorityGlAccount', [organizationPartyId : organizationPartyId], null, false)
}
-context.taxAuthorityHavingNoGlAccountList = taxAuthorityHavingNoGlAccountList;