From: Fabien C. <gk...@ea...> - 2008-03-24 19:24:04
|
Author: gkfabs Date: 2008-03-24 12:24:08 -0700 (Mon, 24 Mar 2008) New Revision: 8146 Modified: versions/1.0/trunk/hot-deploy/financials/webapp/financials/WEB-INF/actions/reports/constructGlAccountTrees.bsh versions/1.0/trunk/hot-deploy/financials/webapp/financials/reports/incomeStatement.ftl Log: 1922714 make financials statements more robust. In case their is unclassified glaccount, it is displayed with a tree. Modified: versions/1.0/trunk/hot-deploy/financials/webapp/financials/WEB-INF/actions/reports/constructGlAccountTrees.bsh =================================================================== --- versions/1.0/trunk/hot-deploy/financials/webapp/financials/WEB-INF/actions/reports/constructGlAccountTrees.bsh 2008-03-24 17:57:13 UTC (rev 8145) +++ versions/1.0/trunk/hot-deploy/financials/webapp/financials/WEB-INF/actions/reports/constructGlAccountTrees.bsh 2008-03-24 19:24:08 UTC (rev 8146) @@ -28,4 +28,11 @@ glAccountTree = new GLAccountTree(delegator, context.get("organizationPartyId"), context.get("orgCurrencyUomId"), accountList); glAccountTrees.put(glAccountTypeId, glAccountTree); } + +accountList = glAccountSums.get("UNCLASSIFIED"); +if (accountList != null) { + glAccountTree = new GLAccountTree(delegator, context.get("organizationPartyId"), context.get("orgCurrencyUomId"), accountList); + glAccountTrees.put("UNCLASSIFIED", glAccountTree); +} + context.put("glAccountTrees", glAccountTrees); \ No newline at end of file Modified: versions/1.0/trunk/hot-deploy/financials/webapp/financials/reports/incomeStatement.ftl =================================================================== --- versions/1.0/trunk/hot-deploy/financials/webapp/financials/reports/incomeStatement.ftl 2008-03-24 17:57:13 UTC (rev 8145) +++ versions/1.0/trunk/hot-deploy/financials/webapp/financials/reports/incomeStatement.ftl 2008-03-24 19:24:08 UTC (rev 8146) @@ -31,12 +31,12 @@ </div> </div> <#list glAccountTrees.keySet() as glAccountTypeId> - <#assign glAccountType = delegator.findByPrimaryKeyCache("GlAccountType", Static["org.ofbiz.base.util.UtilMisc"].toMap("glAccountTypeId", glAccountTypeId))> + <#assign glAccountType = delegator.findByPrimaryKeyCache("GlAccountType", Static["org.ofbiz.base.util.UtilMisc"].toMap("glAccountTypeId", glAccountTypeId))?default({})> <div style="clear:both"/> <table style="width:100%; margin-top: 15px;"; border-width: 0;> <tbody> <tr> - <td class="tableheadtext">${glAccountType.description}</td> + <td class="tableheadtext">${glAccountType.description?default(uiLabelMap.FinancialsUnclassifiedAccounts)}</td> <td class="tableheadtext" style="text-align:right;padding:0; margin:0;"><@ofbizCurrency amount=glAccountTrees.get(glAccountTypeId).getTotalBalance() isoCode=glAccountTrees.get(glAccountTypeId).getCurrencyUomId()/></td> </tr> </tbody> @@ -91,20 +91,5 @@ </#if> </#list> - <#assign unclassifiedAccounts = glAccountSums.get("UNCLASSIFIED")> - <#if unclassifiedAccounts?size != 0> - <div style="margin-top: 30px;"> - <div class="tableheadtext">${uiLabelMap.FinancialsUnclassifiedAccounts}</div> - <hr class="sepbar" style="clear:both"/> - <#list unclassifiedAccounts as account> - <div class="tabletext"> - <span style="float:left"><@displayLink href="AccountActivitiesDetail?glAccountId=${account.glAccountId}" text="${account.accountCode}:"/> ${account.accountName}</span> - <span style="float:right"><@ofbizCurrency amount=account.accountSum isoCode=currencyUomId/></span> - </div> - </#list> - </div> - <div class="spacer"/> - </#if> - </div> </#if> |