You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ap...@apache.org on 2009/08/12 10:38:22 UTC
svn commit: r803415 - in /ofbiz/trunk/applications/accounting:
script/org/ofbiz/accounting/ledger/ servicedef/ webapp/accounting/ledger/
webapp/accounting/reports/ widget/
Author: apatel
Date: Wed Aug 12 08:38:21 2009
New Revision: 803415
URL: http://svn.apache.org/viewvc?rev=803415&view=rev
Log:
Improvements in Cost Center report datafetching process and templates.
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.fo.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl
ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml
ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.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=803415&r1=803414&r2=803415&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 Aug 12 08:38:21 2009
@@ -2509,12 +2509,10 @@
<simple-method method-name="getGlAcctgOrgWithPostedBalanceSplit" short-description="Posted amounts split by cost center from GlAccountOrganization">
<!-- retrieve ledger rounding properties -->
<property-to-field resource="arithmetic" property="ledger.decimals" field="ledgerDecimals"/>
- <property-to-field resource="arithmetic" property="ledger.rounding" field="roundingMode"/>
- <set field="glAcctgOrgAndCostCenterMapList" type="List" value="null"/>
- <now-timestamp field="nowThruDate"/>
+ <set field="glAcctgOrgAndCostCenterList" type="List" from-field="nullfield"/>
+ <now-timestamp field="nowTimestamp"/>
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
- <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowThruDate}"/>
-
+ <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowTimestamp}"/>
<if-empty field="fromDate">
<entity-one entity-name="CustomTimePeriod" value-field="customTimePeriod" auto-field-map="false">
<field-map field-name="customTimePeriodId" from-field="parameters.timePeriod"/>
@@ -2529,59 +2527,89 @@
<condition-list>
<condition-expr field-name="organizationPartyId" operator="in" from-field="partyIds"/>
<condition-expr field-name="postedBalance" operator="not-equals" value=""/>
- <condition-list combine="or">
- <condition-expr field-name="fromDate" operator="greater-equals" from-field="fromDate"/>
- <condition-expr field-name="thruDate" operator="less" from-field="thruDate"/>
- </condition-list>
+ <condition-expr field-name="fromDate" operator="greater-equals" from-field="fromDate"/>
+ <condition-expr field-name="fromDate" operator="less" from-field="thruDate"/>
</condition-list>
<order-by field-name="glAccountId"/>
</entity-condition>
<if-not-empty field="glAccountOrganizations">
- <entity-condition entity-name="GlAccountCategory" list="glAccountCategories">
- <condition-expr field-name="glAccountCategoryTypeId" operator="equals" value="COST_CENTER"/>
+ <entity-and entity-name="GlAccountCategory" list="glAccountCategories" use-cache="true">
+ <field-map field-name="glAccountCategoryTypeId" value="COST_CENTER"/>
<order-by field-name="glAccountCategoryId"/>
- </entity-condition>
- <iterate list="glAccountOrganizations" entry="glAccountOrganization">
-
- <clear-field field="glAcctgOrgAndCostCenterMap"/>
- <set field="glAcctgOrgAndCostCenterMap.glAccountId" from-field="glAccountOrganization.glAccountId"/>
-
- <set field="postedBalance" from-field="glAccountOrganization.postedBalance" type="BigDecimal"/>
- <if-compare field="postedBalance" operator="less" value="0" type="BigDecimal">
- <set field="postedBalance" value="${postedBalance * -1}" type="BigDecimal"/>
- </if-compare>
- <set field="glAcctgOrgAndCostCenterMap.postedBalance" from-field="postedBalance"/>
- <entity-one entity-name="GlAccount" value-field="glAccount" auto-field-map="false">
- <field-map field-name="glAccountId" from-field="glAccountOrganization.glAccountId"/>
- </entity-one>
- <set field="glAcctgOrgAndCostCenterMap.accountCode" from-field="glAccount.accountCode"/>
- <set field="glAcctgOrgAndCostCenterMap.accountName" from-field="glAccount.accountName"/>
-
- <if-not-empty field="glAccountCategories">
-
+ </entity-and>
+ <if-not-empty field="glAccountCategories">
+ <iterate list="glAccountOrganizations" entry="glAccountOrganization">
+ <clear-field field="glAcctgOrgAndCostCenterMap"/>
+ <set field="postedBalance" from-field="glAccountOrganization.postedBalance" type="BigDecimal"/>
+ <if-compare field="postedBalance" operator="less" value="0" type="BigDecimal">
+ <set field="postedBalance" value="${groovy:postedBalance.negate()}" type="BigDecimal"/>
+ </if-compare>
+ <set field="glAcctgOrgAndCostCenterMap.postedBalance" from-field="postedBalance"/>
+ <entity-one entity-name="GlAccount" value-field="glAccount" auto-field-map="false">
+ <field-map field-name="glAccountId" from-field="glAccountOrganization.glAccountId"/>
+ </entity-one>
+ <set field="glAcctgOrgAndCostCenterMap.glAccountId" from-field="glAccount.glAccountId"/>
+ <set field="glAcctgOrgAndCostCenterMap.accountCode" from-field="glAccount.accountCode"/>
+ <set field="glAcctgOrgAndCostCenterMap.accountName" from-field="glAccount.accountName"/>
<iterate list="glAccountCategories" entry="glAccountCategory">
- <entity-condition entity-name="GlAccountCategoryMember" list="glAccountCategoryMembers" filter-by-date="true">
- <condition-list>
- <condition-expr field-name="glAccountId" from-field="glAccountOrganization.glAccountId"/>
- <condition-expr field-name="glAccountCategoryId" from-field="glAccountCategory.glAccountCategoryId"/>
- </condition-list>
- </entity-condition>
+ <entity-and entity-name="GlAccountCategoryMember" list="glAccountCategoryMembers" filter-by-date="true">
+ <field-map field-name="glAccountId" from-field="glAccountOrganization.glAccountId"/>
+ <field-map field-name="glAccountCategoryId" from-field="glAccountCategory.glAccountCategoryId"/>
+ </entity-and>
<if-not-empty field="glAccountCategoryMembers">
<first-from-list list="glAccountCategoryMembers" entry="glAccountCategoryMember"/>
<if-not-empty field="glAccountCategoryMember">
- <set field="splitAmount" value="${postedBalance * glAccountCategoryMember.amountPercentage / 100}" type="BigDecimal"/>
- <calculate field="splitAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}" type="BigDecimal">
- <calcop operator="get" field="splitAmount"/>
- </calculate>
+ <set field="divisor" value="100" type="BigDecimal"/>
+ <set field="splitAmount" value="${groovy:postedBalance.multiply(glAccountCategoryMember.amountPercentage).divide(divisor, Integer.valueOf(ledgerDecimals), BigDecimal.ROUND_HALF_UP)}" type="BigDecimal"/>
<set field="glAcctgOrgAndCostCenterMap[glAccountCategory.glAccountCategoryId]" from-field="splitAmount" type="BigDecimal"/>
</if-not-empty>
</if-not-empty>
</iterate>
+ <field-to-list field="glAcctgOrgAndCostCenterMap" list="glAcctgOrgAndCostCenterList"/>
+ </iterate>
+ </if-not-empty>
+ <field-to-result field="glAcctgOrgAndCostCenterList"/>
+ </if-not-empty>
+ </simple-method>
- <field-to-list field="glAcctgOrgAndCostCenterMap" list="glAcctgOrgAndCostCenterMapList"/>
- </if-not-empty>
- </iterate>
- <field-to-result field="glAcctgOrgAndCostCenterMapList" result-name="glAcctgOrgAndCostCenterMapList"/>
+ <simple-method method-name="getGlAcctgAndAmountPercentage" short-description="Get amount percentage and glAccount for cost center">
+ <set field="glAcctgAndAmountPercentageList" type="List" from-field="nullfield"/>
+ <set field="organizationPartyId" from-field="parameters.organizationPartyId"/>
+ <set field="partyIds" value="${groovy:org.ofbiz.party.party.PartyWorker.getAssociatedPartyIdsByRelationshipType(delegator, organizationPartyId, 'GROUP_ROLLUP')}" type="List"/>
+ <set field="partyIds[]" from-field="organizationPartyId"/>
+ <entity-condition entity-name="GlAccountOrganization" list="glAccountOrganizations" use-cache="true">
+ <condition-expr field-name="organizationPartyId" operator="in" from-field="partyIds"/>
+ <order-by field-name="glAccountId"/>
+ </entity-condition>
+ <if-not-empty field="glAccountOrganizations">
+ <entity-and entity-name="GlAccountCategory" list="glAccountCategories" use-cache="true">
+ <field-map field-name="glAccountCategoryTypeId" value="COST_CENTER"/>
+ <order-by field-name="glAccountCategoryId"/>
+ </entity-and>
+ <if-not-empty field="glAccountCategories">
+ <iterate list="glAccountOrganizations" entry="glAccountOrganization">
+ <clear-field field="glAcctgOrgAndCostCenterMap"/>
+ <get-related-one value-field="glAccountOrganization" relation-name="GlAccount" to-value-field="glAccount"/>
+ <set field="glAcctgOrgAndCostCenterMap.glAccountId" from-field="glAccount.glAccountId"/>
+ <set field="glAcctgOrgAndCostCenterMap.accountCode" from-field="glAccount.accountCode"/>
+ <set field="glAcctgOrgAndCostCenterMap.accountName" from-field="glAccount.accountName"/>
+ <iterate list="glAccountCategories" entry="glAccountCategory">
+ <entity-and entity-name="GlAccountCategoryMember" list="glAccountCategoryMembers" filter-by-date="true">
+ <field-map field-name="glAccountId" from-field="glAccountOrganization.glAccountId"/>
+ <field-map field-name="glAccountCategoryId" from-field="glAccountCategory.glAccountCategoryId"/>
+ </entity-and>
+ <if-not-empty field="glAccountCategoryMembers">
+ <first-from-list list="glAccountCategoryMembers" entry="glAccountCategoryMember"/>
+ <if-not-empty field="glAccountCategoryMember">
+ <set field="glAcctgOrgAndCostCenterMap[glAccountCategory.glAccountCategoryId]" from-field="glAccountCategoryMember.amountPercentage" type="BigDecimal"/>
+ </if-not-empty>
+ </if-not-empty>
+ </iterate>
+ <field-to-list field="glAcctgOrgAndCostCenterMap" list="glAcctgAndAmountPercentageList"/>
+ </iterate>
+ <field-to-result field="glAccountCategories"/>
+ </if-not-empty>
+ <field-to-result field="glAcctgAndAmountPercentageList"/>
</if-not-empty>
</simple-method>
Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=803415&r1=803414&r2=803415&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Wed Aug 12 08:38:21 2009
@@ -645,14 +645,22 @@
<attribute name="amountPercentage" mode="IN" type="BigDecimal" optional="true"/>
</service>
- <service name="getGlAcctgOrgWithPostedBalanceSplit" engine="simple" default-entity-name="GlAccountOrganization"
+ <service name="getGlAcctgOrgWithPostedBalanceSplit" engine="simple"
location="component://accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="getGlAcctgOrgWithPostedBalanceSplit" auth="true">
<description>Posted amounts split by cost center from GlAccountOrganization</description>
<attribute name="organizationPartyId" type="String" mode="IN"/>
<attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
<attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
<attribute name="timePeriod" type="String" mode="IN" optional="true"/>
- <attribute name="glAcctgOrgAndCostCenterMapList" mode="OUT" type="List" optional="true"/>
+ <attribute name="glAcctgOrgAndCostCenterList" mode="OUT" type="List" optional="true"/>
+ </service>
+
+ <service name="getGlAcctgAndAmountPercentage" engine="simple"
+ location="component://accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="getGlAcctgAndAmountPercentage" auth="false">
+ <description>Get amount percentage and glAccount for cost center</description>
+ <attribute name="organizationPartyId" mode="IN" type="String"/>
+ <attribute name="glAcctgAndAmountPercentageList" mode="OUT" type="List" optional="true"/>
+ <attribute name="glAccountCategories" mode="OUT" type="List" optional="true"/>
</service>
<service name="getInventoryValuationList" engine="simple"
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl?rev=803415&r1=803414&r2=803415&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl Wed Aug 12 08:38:21 2009
@@ -17,7 +17,7 @@
specific language governing permissions and limitations
under the License.
-->
-<#if glAccountOrganizations?has_content && glAccountCategories?has_content>
+<#if glAcctgAndAmountPercentageList?has_content && glAccountCategories?has_content>
<form name="costCenters" id="costCenters" method="post" action="<@o...@ofbizUrl>">
<input type="hidden" name="_useRowSubmit" value="Y">
@@ -31,28 +31,21 @@
</#list>
</tr>
- <#list glAccountOrganizations as glAccountOrganization>
+ <#list glAcctgAndAmountPercentageList as glAcctgAndAmountPercentage>
<tr>
- <#assign glAccountOrganizationIndex = glAccountOrganization_index + 1/>
- <td>${glAccountOrganization.glAccountId}</td>
- <#assign glAccount = delegator.findOne("GlAccount", {"glAccountId" : glAccountOrganization.glAccountId}, true)/>
- <td>${glAccount.accountCode}</td>
- <td>${glAccount.accountName}</td>
+ <#assign glAccountOrganizationIndex = glAcctgAndAmountPercentage_index + 1/>
+ <td>${glAcctgAndAmountPercentage.glAccountId}</td>
+ <td>${glAcctgAndAmountPercentage.accountCode!}</td>
+ <td>${glAcctgAndAmountPercentage.accountName!}</td>
<#list glAccountCategories as glAccountCategory>
-
- <#assign glAccountCategoryMember = null/>
<td>
- <input type="hidden" id="glAccountId_${glAccountOrganization.glAccountId}" name="glAccountId_o_${glAccountOrganizationIndex}${glAccountCategory_index}" value="${glAccountOrganization.glAccountId!}"/>
- <input type="hidden" id="glAccountCategoryId_${glAccountCategory.glAccountCategoryId}_${glAccountOrganization.glAccountId}" name="glAccountCategoryId_o_${glAccountOrganizationIndex}${glAccountCategory_index}" value="${(glAccountCategory.glAccountCategoryId!)}"/>
+ <input type="hidden" id="glAccountId_${glAcctgAndAmountPercentage.glAccountId}" name="glAccountId_o_${glAccountOrganizationIndex}${glAccountCategory_index}" value="${glAcctgAndAmountPercentage.glAccountId!}"/>
+ <input type="hidden" id="glAccountCategoryId_${glAccountCategory.glAccountCategoryId}_${glAcctgAndAmountPercentage.glAccountId}" name="glAccountCategoryId_o_${glAccountOrganizationIndex}${glAccountCategory_index}" value="${(glAccountCategory.glAccountCategoryId!)}"/>
- <#assign glAccountCategoryMembers = delegator.findByAnd("GlAccountCategoryMember", {"glAccountId" : glAccountOrganization.glAccountId, "glAccountCategoryId" : glAccountCategory.glAccountCategoryId, "thruDate" : null}, Static["org.ofbiz.base.util.UtilMisc"].toList("fromDate"))/>
- <#if glAccountCategoryMembers?has_content>
- <#assign glAccountCategoryMember = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(glAccountCategoryMembers)/>
- </#if>
- <#if glAccountCategoryMember != null>
- <input type="text" id="amountPercentage_${glAccountCategory.glAccountCategoryId}_${glAccountOrganization.glAccountId}" name="amountPercentage_o_${glAccountOrganizationIndex}${glAccountCategory_index}" value="${(glAccountCategoryMember.amountPercentage!)}"/>
+ <#if (glAcctgAndAmountPercentage[glAccountCategory.glAccountCategoryId!])??>
+ <input type="text" id="amountPercentage_${glAccountCategory.glAccountCategoryId}_${glAcctgAndAmountPercentage.glAccountId}" name="amountPercentage_o_${glAccountOrganizationIndex}${glAccountCategory_index}" value="${(glAcctgAndAmountPercentage[glAccountCategory.glAccountCategoryId!])!}"/>
<#else>
- <input type="text" id="amountPercentage_${glAccountCategory.glAccountCategoryId}_${glAccountOrganization.glAccountId}" name="amountPercentage_o_${glAccountOrganizationIndex}${glAccountCategory_index}" value=""/>
+ <input type="text" id="amountPercentage_${glAccountCategory.glAccountCategoryId}_${glAcctgAndAmountPercentage.glAccountId}" name="amountPercentage_o_${glAccountOrganizationIndex}${glAccountCategory_index}" value=""/>
</#if>
<input name="_rowSubmit_o_${glAccountOrganizationIndex}${glAccountCategory_index}" type="hidden" value="Y"/>
</td>
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.fo.ftl?rev=803415&r1=803414&r2=803415&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.fo.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.fo.ftl Wed Aug 12 08:38:21 2009
@@ -17,7 +17,7 @@
under the License.
-->
<#escape x as x?xml>
- <#if glAcctgOrgAndCostCenterMapList?has_content && glAccountCategories?has_content>
+ <#if glAcctgOrgAndCostCenterList?has_content && glAccountCategories?has_content>
<fo:table border="1pt solid" border-width=".1mm" width="19cm">
<fo:table-header>
<fo:table-cell border="1pt solid" border-width=".1mm">
@@ -39,24 +39,24 @@
</#list>
</fo:table-header>
<fo:table-body>
- <#list glAcctgOrgAndCostCenterMapList as glAcctgOrgAndCostCenterMap>
- <#if glAcctgOrgAndCostCenterMap?has_content>
+ <#list glAcctgOrgAndCostCenterList as glAcctgOrgAndCostCenter>
+ <#if glAcctgOrgAndCostCenter?has_content>
<fo:table-row>
<fo:table-cell border="1pt solid" border-width=".1mm">
- <fo:block text-align="center">${glAcctgOrgAndCostCenterMap.glAccountId?if_exists}</fo:block>
+ <fo:block text-align="center">${glAcctgOrgAndCostCenter.glAccountId?if_exists}</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid" border-width=".1mm">
- <fo:block text-align="center">${glAcctgOrgAndCostCenterMap.accountCode?if_exists}</fo:block>
+ <fo:block text-align="center">${glAcctgOrgAndCostCenter.accountCode?if_exists}</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid" border-width=".1mm">
- <fo:block text-align="center">${glAcctgOrgAndCostCenterMap.accountName?if_exists}</fo:block>
+ <fo:block text-align="center">${glAcctgOrgAndCostCenter.accountName?if_exists}</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid" border-width=".1mm">
- <fo:block text-align="center">${glAcctgOrgAndCostCenterMap.postedBalance?if_exists!}</fo:block>
+ <fo:block text-align="center">${glAcctgOrgAndCostCenter.postedBalance?if_exists!}</fo:block>
</fo:table-cell>
<#list glAccountCategories as glAccountCategory>
<fo:table-cell border="1pt solid" border-width=".1mm">
- <fo:block text-align="center">${(glAcctgOrgAndCostCenterMap[glAccountCategory.glAccountCategoryId?if_exists]?if_exists)}</fo:block>
+ <fo:block text-align="center">${(glAcctgOrgAndCostCenter[glAccountCategory.glAccountCategoryId?if_exists]?if_exists)}</fo:block>
</fo:table-cell>
</#list>
</fo:table-row>
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl?rev=803415&r1=803414&r2=803415&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl Wed Aug 12 08:38:21 2009
@@ -17,7 +17,7 @@
specific language governing permissions and limitations
under the License.
-->
-<#if glAcctgOrgAndCostCenterMapList?has_content && glAccountCategories?has_content>
+<#if glAcctgOrgAndCostCenterList?has_content && glAccountCategories?has_content>
<form name="costCentersReportPdfForm" method="post" action="<@o...@ofbizUrl>">
<input type="hidden" name="organizationPartyId" value="${parameters.organizationPartyId}"/>
<input type="hidden" name="fromDate" value="${parameters.fromDate}"/>
@@ -35,20 +35,20 @@
<th>${glAccountCategory.description!} - (${currencyUomId})</th>
</#list>
</tr>
- <#list glAcctgOrgAndCostCenterMapList as glAcctgOrgAndCostCenterMap>
- <#if glAcctgOrgAndCostCenterMap?has_content>
+ <#list glAcctgOrgAndCostCenterList as glAcctgOrgAndCostCenter>
+ <#if glAcctgOrgAndCostCenter?has_content>
<tr>
- <td>${glAcctgOrgAndCostCenterMap.glAccountId?if_exists}</td>
- <td>${glAcctgOrgAndCostCenterMap.accountCode?if_exists}</td>
- <td>${glAcctgOrgAndCostCenterMap.accountName?if_exists}</td>
- <td>${glAcctgOrgAndCostCenterMap.postedBalance?if_exists}</td>
+ <td>${glAcctgOrgAndCostCenter.glAccountId?if_exists}</td>
+ <td>${glAcctgOrgAndCostCenter.accountCode?if_exists}</td>
+ <td>${glAcctgOrgAndCostCenter.accountName?if_exists}</td>
+ <td>${glAcctgOrgAndCostCenter.postedBalance?if_exists}</td>
<#list glAccountCategories as glAccountCategory>
- <td>${(glAcctgOrgAndCostCenterMap[glAccountCategory.glAccountCategoryId?if_exists]?if_exists)}</td>
+ <td>${(glAcctgOrgAndCostCenter[glAccountCategory.glAccountCategoryId?if_exists]?if_exists)}</td>
</#list>
</tr>
</#if>
</#list>
</table>
<#else>
- <label>${uiLabelMap.AccountingNoRecordFound}</label>
+ <h2>${uiLabelMap.AccountingNoRecordFound}</h2>
</#if>
Modified: ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml?rev=803415&r1=803414&r2=803415&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml Wed Aug 12 08:38:21 2009
@@ -468,27 +468,33 @@
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<set field="titleProperty" value="FormFieldTitle_costCenters"/>
<set field="tabButtonItem" value="CostCenters"/>
- <entity-condition entity-name="GlAccountOrganization" list="glAccountOrganizations" distinct="true">
- <order-by field-name="glAccountId"/>
- </entity-condition>
- <entity-condition entity-name="GlAccountCategory" list="glAccountCategories">
- <condition-expr field-name="glAccountCategoryTypeId" operator="equals" value="COST_CENTER"/>
- </entity-condition>
</actions>
<widgets>
<decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <screenlet title="${uiLabelMap.FormFieldTitle_costCenters}">
- <platform-specific>
- <html>
- <html-template location="component://accounting/webapp/accounting/ledger/CostCenters.ftl"/>
- </html>
- </platform-specific>
- </screenlet>
+ <section>
+ <actions>
+ <set field="organizationPartyId" from-field="parameters.organizationPartyId" default-value="${defaultOrganizationPartyId}"/>
+ <service service-name="getGlAcctgAndAmountPercentage" result-map="result">
+ <field-map field-name="organizationPartyId"/>
+ </service>
+ <set field="glAcctgAndAmountPercentageList" from-field="result.glAcctgAndAmountPercentageList" type="List"/>
+ <set field="glAccountCategories" from-field="result.glAccountCategories" type="List"/>
+ </actions>
+ <widgets>
+ <screenlet title="${uiLabelMap.FormFieldTitle_costCenters}">
+ <platform-specific>
+ <html>
+ <html-template location="component://accounting/webapp/accounting/ledger/CostCenters.ftl"/>
+ </html>
+ </platform-specific>
+ </screenlet>
+ </widgets>
+ </section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
-</screens>
\ No newline at end of file
+</screens>
Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=803415&r1=803414&r2=803415&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Wed Aug 12 08:38:21 2009
@@ -1047,7 +1047,7 @@
<set field="tabButtonItem" value="OrganizationAccountingReports"/>
<set field="tabButtonItem2" value="CostCenterReport"/>
<set field="organizationPartyId" from-field="parameters.organizationPartyId" type="String"/>
- <set field="glAcctgOrgAndCostCenterMapList" from-field="parameters.glAcctgOrgAndCostCenterMapList" type="List"/>
+ <set field="glAcctgOrgAndCostCenterList" from-field="parameters.glAcctgOrgAndCostCenterList" type="List"/>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy"/>
</actions>
<widgets>
@@ -1092,7 +1092,7 @@
<condition-expr field-name="glAccountCategoryTypeId" operator="equals" value="COST_CENTER"/>
</entity-condition>
<service service-name="getGlAcctgOrgWithPostedBalanceSplit" result-map="result" auto-field-map="true"/>
- <set field="glAcctgOrgAndCostCenterMapList" from-field="result.glAcctgOrgAndCostCenterMapList" type="List"/>
+ <set field="glAcctgOrgAndCostCenterList" from-field="result.glAcctgOrgAndCostCenterList" type="List"/>
</actions>
<widgets>
<decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml">