|
Author: ashish
Date: Mon Dec 14 11:02:40 2009 New Revision: 890272 URL: http://svn.apache.org/viewvc?rev=890272&view=rev Log: Applied patch from jira issue OFBIZ-3332 - Implement Comparative Cash Flow Statement. Thanks Sumit & Jacopo for the contribution. Added: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy (with props) Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=890272&r1=890271&r2=890272&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Mon Dec 14 11:02:40 2009 @@ -1817,7 +1817,7 @@ </property> <property key="AccountingCashFlowStatement"> <value xml:lang="en">Cash Flow Statement</value> - <value xml:lang="hi_IN">à ¤µà ¤â¢Ã Â¥Âà ¤¤à ¤µà ¥Âà ¤¯ à ¤¨à ¤â¢Ã ¤¦ à ¤ªà ¥Âà ¤°à ¤µà ¤¾à ¤¹</value> + <value xml:lang="hi_IN">रà¥à¤à¤¡ पà¥à¤°à¤µà¤¾à¤¹ विवरण</value> </property> <property key="AccountingChartOfAcctsFor"> <value xml:lang="en">Chart of accounts for</value> @@ -2050,6 +2050,10 @@ <value xml:lang="th">à¹à¸à¸£à¸µà¸¢à¸à¹à¸à¸µà¸¢à¸à¸à¸à¸à¸¸à¸¥</value> <value xml:lang="zh">æ¯è¾èµäº§è´åºè¡¨</value> </property> + <property key="AccountingComparativeCashFlowStatement"> + <value xml:lang="en">Comparative Cash Flow Statement</value> + <value xml:lang="hi_IN">तà¥à¤²à¤¨à¤¾à¤¤à¥à¤®à¤ रà¥à¤à¤¡ पà¥à¤°à¤µà¤¾à¤¹ विवरण</value> + </property> <property key="AccountingComparativeIncomeStatement"> <value xml:lang="de">Vergleichs-Ertragsrechnung</value> <value xml:lang="en">Comparative Income Statement</value> Added: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy?rev=890272&view=auto ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy (added) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy Mon Dec 14 11:02:40 2009 @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.ofbiz.base.util.UtilMisc; +import java.math.BigDecimal; + +openingCashBalanceMap = [:]; +openingCashBalanceList = []; +openingCashBalanceList1.each { accountBalance -> + openingCashBalanceMap.put(accountBalance.glAccountId, UtilMisc.toMap("glAccountId", accountBalance.glAccountId, "accountCode", accountBalance.accountCode, "accountName", accountBalance.accountName, "balance1", accountBalance.balance, "balance2", BigDecimal.ZERO)); +} +openingCashBalanceList2.each { accountBalance -> + Map openingCashAccount = (Map)openingCashBalanceMap.get(accountBalance.glAccountId); + if (!openingCashAccount) { + openingCashBalanceMap.put(accountBalance.glAccountId, UtilMisc.toMap("glAccountId", accountBalance.glAccountId, "accountCode", accountBalance.accountCode, "accountName", accountBalance.accountName, "balance2", accountBalance.balance, "balance1", BigDecimal.ZERO)); + } else { + openingCashAccount.put("balance2", accountBalance.balance); + } +} +openingCashBalanceList = UtilMisc.sortMaps(openingCashBalanceMap.values().asList(), UtilMisc.toList("accountCode")); +context.openingCashBalanceList = openingCashBalanceList; + +periodCashBalanceMap = [:]; +periodCashBalanceList = []; +periodCashBalanceList1.each { accountBalance -> + periodCashBalanceMap.put(accountBalance.glAccountId, UtilMisc.toMap("glAccountId", accountBalance.glAccountId, "accountCode", accountBalance.accountCode, "accountName", accountBalance.accountName, "balance1", accountBalance.balance, "balance2", BigDecimal.ZERO)); +} +periodCashBalanceList2.each { accountBalance -> + Map periodCashAccount = (Map)periodCashBalanceMap.get(accountBalance.glAccountId); + if (!periodCashAccount) { + periodCashBalanceMap.put(accountBalance.glAccountId, UtilMisc.toMap("glAccountId", accountBalance.glAccountId, "accountCode", accountBalance.accountCode, "accountName", accountBalance.accountName, "balance2", accountBalance.balance, "balance1", BigDecimal.ZERO)); + } else { + periodCashAccount.put("balance2", accountBalance.balance); + } +} +periodCashBalanceList = UtilMisc.sortMaps(periodCashBalanceMap.values().asList(), UtilMisc.toList("accountCode")); +context.periodCashBalanceList = periodCashBalanceList; + +closingCashBalanceMap = [:]; +closingCashBalanceList = []; +closingCashBalanceList1.each { accountBalance -> + closingCashBalanceMap.put(accountBalance.glAccountId, UtilMisc.toMap("glAccountId", accountBalance.glAccountId, "accountCode", accountBalance.accountCode, "accountName", accountBalance.accountName, "balance1", accountBalance.balance, "balance2", BigDecimal.ZERO)); +} +closingCashBalanceList2.each { accountBalance -> + Map closingCashAccount = (Map)closingCashBalanceMap.get(accountBalance.glAccountId); + if (!closingCashAccount) { + closingCashBalanceMap.put(accountBalance.glAccountId, UtilMisc.toMap("glAccountId", accountBalance.glAccountId, "accountCode", accountBalance.accountCode, "accountName", accountBalance.accountName, "balance2", accountBalance.balance, "balance1", BigDecimal.ZERO)); + } else { + closingCashAccount.put("balance2", accountBalance.balance); + } +} +closingCashBalanceList = UtilMisc.sortMaps(closingCashBalanceMap.values().asList(), UtilMisc.toList("accountCode")); +context.closingCashBalanceList = closingCashBalanceList; + +balanceTotalMap = [:]; +cashFlowBalanceTotalList = []; +cashFlowBalanceTotalList1.each { accountBalance -> + balanceTotalMap.put(accountBalance.totalName, UtilMisc.toMap("totalName", accountBalance.totalName, "balance1", accountBalance.balance, "balance2", BigDecimal.ZERO)); +} +cashFlowBalanceTotalList2.each { accountBalance -> + Map cashFlowBalanceAccount = (Map)balanceTotalMap.get(accountBalance.totalName); + if (!cashFlowBalanceAccount) { + balanceTotalMap.put(accountBalance.totalName, UtilMisc.toMap("totalName", accountBalance.totalName, "balance2", accountBalance.balance, "balance1", BigDecimal.ZERO)); + } else { + cashFlowBalanceAccount.put("balance2", accountBalance.balance); + } +} +cashFlowBalanceTotalList = balanceTotalMap.values().asList(); +context.cashFlowBalanceTotalList = cashFlowBalanceTotalList; + Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=890272&r1=890271&r2=890272&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Mon Dec 14 11:02:40 2009 @@ -2277,6 +2277,23 @@ <security https="true" auth="true"/> <response name="success" type="view" value="CashFlowStatementListCsv"/> </request-map> + <request-map uri="ComparativeCashFlowStatement"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ComparativeCashFlowStatement"/> + <response name="error" type="view" value="ComparativeCashFlowStatement"/> + </request-map> + <request-map uri="ComparativeCashFlowStatement.csv"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ComparativeCashFlowStatementCsv"/> + <response name="error" type="view" value="ComparativeCashFlowStatement"/> + </request-map> + <request-map uri="ComparativeCashFlowStatement.pdf"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ComparativeCashFlowStatementPdf"/> + <response name="error" type="view" value="ComparativeCashFlowStatement"/> + </request-map> + + <!-- ================ Depreciation Calculation Report requests ================ --> <request-map uri="showFixedAssetDepreciation"> @@ -2731,6 +2748,9 @@ <view-map name="CashFlowStatement" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#CashFlowStatement"/> <view-map name="CashFlowStatementListPdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#CashFlowStatementListPdf" content-type="application/pdf" encoding="none"/> <view-map name="CashFlowStatementListCsv" type="screencsv" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#CashFlowStatementListCsv" content-type="text/csv" encoding="none"/> + <view-map name="ComparativeCashFlowStatement" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#ComparativeCashFlowStatement"/> + <view-map name="ComparativeCashFlowStatementPdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#ComparativeCashFlowStatementPdf" content-type="application/pdf" encoding="none"/> + <view-map name="ComparativeCashFlowStatementCsv" type="screencsv" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#ComparativeCashFlowStatementCsv" content-type="text/csv" encoding="none"/> <!-- Assignment Mappings --> <view-map name="EditPartyFixedAssetAssignments" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#EditPartyFixedAssetAssignments"/> Modified: ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml?rev=890272&r1=890271&r2=890272&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml Mon Dec 14 11:02:40 2009 @@ -832,6 +832,11 @@ <parameter param-name="organizationPartyId"/> </link> </menu-item> + <menu-item name="ComparativeCashFlowStatement" title="${uiLabelMap.AccountingComparativeCashFlowStatement}"> + <link target="ComparativeCashFlowStatement"> + <parameter param-name="organizationPartyId"/> + </link> + </menu-item> </menu> <menu name="PartyAdminTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="PartyAcctgPreference"> Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=890272&r1=890271&r2=890272&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Mon Dec 14 11:02:40 2009 @@ -652,4 +652,93 @@ </field> <field name="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + <form name="ComparativeCashFlowStatementParameters" type="single" target="ComparativeCashFlowStatement" header-row-style="header-row" default-table-style="basic-table"> + <field name="organizationPartyId"><hidden/></field> + <field name="period1FromDate" title="${uiLabelMap.FormFieldTitle_period1FromDate}" required-field="true" position="1"><date-time type="timestamp"/></field> + <field name="period2FromDate" title="${uiLabelMap.FormFieldTitle_period2FromDate}" required-field="true" position="2"><date-time type="timestamp"/></field> + <field name="period1ThruDate" title="${uiLabelMap.FormFieldTitle_period1ThruDate}" required-field="true" position="1"><date-time type="timestamp"/></field> + <field name="period2ThruDate" title="${uiLabelMap.FormFieldTitle_period2ThruDate}" required-field="true" position="2"><date-time type="timestamp"/></field> + <field name="period1GlFiscalTypeId" position="1"> + <drop-down> + <entity-options entity-name="GlFiscalType" key-field-name="glFiscalTypeId" description="${description}"> + <entity-order-by field-name="glFiscalTypeId"/> + </entity-options> + </drop-down> + </field> + <field name="period2GlFiscalTypeId" position="2"> + <drop-down> + <entity-options entity-name="GlFiscalType" key-field-name="glFiscalTypeId" description="${description}"> + <entity-order-by field-name="glFiscalTypeId"/> + </entity-options> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + <form name="ComparativeCashFlowStatementOpeningCashBalance" type="list" list-name="openingCashBalanceList" + odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> + <field name="accountCode"> + <hyperlink target="FindAcctgTransEntries" description="${accountCode}"> + <parameter param-name="glAccountId"/> + <parameter param-name="organizationPartyId"/> + </hyperlink> + </field> + <field name="accountName" title-area-style="tableheadwide"><display description="${accountName}"/></field> + <field name="balance1" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field> + <field name="balance2" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field> + </form> + <form name="ComparativeCashFlowStatementPeriodCashBalance" type="list" list-name="periodCashBalanceList" + odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> + <field name="accountCode"> + <hyperlink target="FindAcctgTransEntries" description="${accountCode}"> + <parameter param-name="glAccountId"/> + <parameter param-name="organizationPartyId"/> + </hyperlink> + </field> + <field name="accountName" title-area-style="tableheadwide"><display description="${accountName}"/></field> + <field name="balance1" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field> + <field name="balance2" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field> + </form> + <form name="ComparativeCashFlowStatementClosingCashBalance" type="list" list-name="closingCashBalanceList" + odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> + <field name="accountCode"> + <hyperlink target="FindAcctgTransEntries" description="${accountCode}"> + <parameter param-name="glAccountId"/> + <parameter param-name="organizationPartyId"/> + </hyperlink> + </field> + <field name="accountName" title-area-style="tableheadwide"><display description="${accountName}"/></field> + <field name="balance1" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field> + <field name="balance2" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field> + </form> + <form name="ComparativeCashFlowBalanceTotals" type="list" list-name="cashFlowBalanceTotalList" + odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> + <row-actions> + <set field="totalName" value="${groovy: uiLabelMap.get(totalName)}"/> + </row-actions> + <field name="totalName" title-area-style="tableheadwide"><display description="${totalName}"/></field> + <field name="balance1" title="Period1" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field> + <field name="balance2" title="Period2" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field> + </form> + <!-- This is required to render the date range in the PDF: the two columns layout is not supported --> + <form name="ComparativeCashFlowStatementParametersOneColumn" type="single" target="" header-row-style="header-row" default-table-style="basic-table"> + <field name="organizationPartyId"><hidden/></field> + <field name="period1FromDate" title="${uiLabelMap.FormFieldTitle_period1FromDate}" required-field="true"><date-time type="timestamp"/></field> + <field name="period1ThruDate" title="${uiLabelMap.FormFieldTitle_period1ThruDate}" required-field="true"><date-time type="timestamp"/></field> + <field name="period1GlFiscalTypeId"> + <drop-down> + <entity-options entity-name="GlFiscalType" key-field-name="glFiscalTypeId" description="${description}"> + <entity-order-by field-name="glFiscalTypeId"/> + </entity-options> + </drop-down> + </field> + <field name="period2FromDate" title="${uiLabelMap.FormFieldTitle_period2FromDate}" required-field="true"><date-time type="timestamp"/></field> + <field name="period2ThruDate" title="${uiLabelMap.FormFieldTitle_period2ThruDate}" required-field="true"><date-time type="timestamp"/></field> + <field name="period2GlFiscalTypeId"> + <drop-down> + <entity-options entity-name="GlFiscalType" key-field-name="glFiscalTypeId" description="${description}"> + <entity-order-by field-name="glFiscalTypeId"/> + </entity-options> + </drop-down> + </field> + </form> </forms> Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=890272&r1=890271&r2=890272&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Mon Dec 14 11:02:40 2009 @@ -1563,4 +1563,212 @@ </widgets> </section> </screen> + <screen name="ComparativeCashFlowStatement"> + <section> + <actions> + <set field="viewSize" value="99999"/> + <set field="titleProperty" value="AccountingComparativeCashFlowStatement"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="ComparativeCashFlowStatement"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId" type="String"/> + <service service-name="getPartyAccountingPreferences" result-map="result"> + <field-map field-name="organizationPartyId"/> + </service> + <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/> + <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/> + + <!-- Get a default fromDate --> + <service service-name="findLastClosedDate" result-map="findLastClosedDateOutMap"> + <field-map field-name="organizationPartyId" from-field="organizationPartyId"/> + </service> + + <set field="period1FromDate" from-field="parameters.period1FromDate" type="Timestamp" default-value="${findLastClosedDateOutMap.lastClosedDate}"/> + <set field="period1ThruDate" from-field="parameters.period1ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period1GlFiscalTypeId" from-field="parameters.period1GlFiscalTypeId" default-value="ACTUAL"/> + <set field="fromDate" from-field="period1FromDate"/> + <set field="thruDate" from-field="period1ThruDate"/> + <set field="glFiscalTypeId" from-field="period1GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy"/> + <set field="openingCashBalanceList1" from-field="openingCashBalanceList"/> + <set field="periodCashBalanceList1" from-field="periodCashBalanceList"/> + <set field="closingCashBalanceList1" from-field="closingCashBalanceList"/> + <set field="cashFlowBalanceTotalList1" from-field="cashFlowBalanceTotalList"/> + + <set field="period2FromDate" from-field="parameters.period2FromDate" type="Timestamp" default-value="${findLastClosedDateOutMap.lastClosedDate}"/> + <set field="period2ThruDate" from-field="parameters.period2ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period2GlFiscalTypeId" from-field="parameters.period2GlFiscalTypeId" default-value="ACTUAL"/> + <set field="fromDate" from-field="period2FromDate"/> + <set field="thruDate" from-field="period2ThruDate"/> + <set field="glFiscalTypeId" from-field="period2GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy"/> + <set field="openingCashBalanceList2" from-field="openingCashBalanceList"/> + <set field="periodCashBalanceList2" from-field="periodCashBalanceList"/> + <set field="closingCashBalanceList2" from-field="closingCashBalanceList"/> + <set field="cashFlowBalanceTotalList2" from-field="cashFlowBalanceTotalList"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy"/> + </actions> + <widgets> + <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.AccountingComparativeCashFlowStatement}"> + <include-form name="ComparativeCashFlowStatementParameters" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.AccountingComparativeCashFlowStatement}"> + <link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="ComparativeCashFlowStatement.csv"> + <parameter param-name="period1FromDate" from-field="period1FromDate"/> + <parameter param-name="period1ThruDate" from-field="period1ThruDate"/> + <parameter param-name="period1GlFiscalTypeId" from-field="period1GlFiscalTypeId"/> + <parameter param-name="period2FromDate" from-field="period2FromDate"/> + <parameter param-name="period2ThruDate" from-field="period2ThruDate"/> + <parameter param-name="period2GlFiscalTypeId" from-field="period2GlFiscalTypeId"/> + <parameter param-name="organizationPartyId"/> + <parameter param-name="currencyUomId"/> + </link> + <link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="ComparativeCashFlowStatement.pdf"> + <parameter param-name="period1FromDate" from-field="period1FromDate"/> + <parameter param-name="period1ThruDate" from-field="period1ThruDate"/> + <parameter param-name="period1GlFiscalTypeId" from-field="period1GlFiscalTypeId"/> + <parameter param-name="period2FromDate" from-field="period2FromDate"/> + <parameter param-name="period2ThruDate" from-field="period2ThruDate"/> + <parameter param-name="period2GlFiscalTypeId" from-field="period2GlFiscalTypeId"/> + <parameter param-name="organizationPartyId"/> + <parameter param-name="currencyUomId"/> + </link> + <label style="h3" text="${uiLabelMap.AccountingOpeningCashBalance}"/> + <include-form name="ComparativeCashFlowStatementOpeningCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingPeriodCashBalance}"/> + <include-form name="ComparativeCashFlowStatementPeriodCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingClosingCashBalance}"/> + <include-form name="ComparativeCashFlowStatementClosingCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="ComparativeCashFlowBalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="ComparativeCashFlowStatementPdf"> + <section> + <actions> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="viewSize" value="99999"/> + <set field="titleProperty" value="AccountingComparativeCashFlowStatement"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="ComparativeCashFlowStatement"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId" type="String"/> + <service service-name="getPartyAccountingPreferences" result-map="result"> + <field-map field-name="organizationPartyId"/> + </service> + <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/> + <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/> + + <!-- Get a default fromDate --> + <service service-name="findLastClosedDate" result-map="findLastClosedDateOutMap"> + <field-map field-name="organizationPartyId" from-field="organizationPartyId"/> + </service> + + <set field="period1FromDate" from-field="parameters.period1FromDate" type="Timestamp" default-value="${findLastClosedDateOutMap.lastClosedDate}"/> + <set field="period1ThruDate" from-field="parameters.period1ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period1GlFiscalTypeId" from-field="parameters.period1GlFiscalTypeId" default-value="ACTUAL"/> + <set field="fromDate" from-field="period1FromDate"/> + <set field="thruDate" from-field="period1ThruDate"/> + <set field="glFiscalTypeId" from-field="period1GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy"/> + <set field="openingCashBalanceList1" from-field="openingCashBalanceList"/> + <set field="periodCashBalanceList1" from-field="periodCashBalanceList"/> + <set field="closingCashBalanceList1" from-field="closingCashBalanceList"/> + <set field="cashFlowBalanceTotalList1" from-field="cashFlowBalanceTotalList"/> + + <set field="period2FromDate" from-field="parameters.period2FromDate" type="Timestamp" default-value="${findLastClosedDateOutMap.lastClosedDate}"/> + <set field="period2ThruDate" from-field="parameters.period2ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period2GlFiscalTypeId" from-field="parameters.period2GlFiscalTypeId" default-value="ACTUAL"/> + <set field="fromDate" from-field="period2FromDate"/> + <set field="thruDate" from-field="period2ThruDate"/> + <set field="glFiscalTypeId" from-field="period2GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy"/> + <set field="openingCashBalanceList2" from-field="openingCashBalanceList"/> + <set field="periodCashBalanceList2" from-field="periodCashBalanceList"/> + <set field="closingCashBalanceList2" from-field="closingCashBalanceList"/> + <set field="cashFlowBalanceTotalList2" from-field="cashFlowBalanceTotalList"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy"/> + </actions> + <widgets> + <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="body"> + <container> + <label style="h1" text="${uiLabelMap.AccountingComparativeCashFlowStatement}"/> + <include-form name="ComparativeCashFlowStatementParametersOneColumn" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingOpeningCashBalance}"/> + <include-form name="ComparativeCashFlowStatementOpeningCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingPeriodCashBalance}"/> + <include-form name="ComparativeCashFlowStatementPeriodCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingClosingCashBalance}"/> + <include-form name="ComparativeCashFlowStatementClosingCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="ComparativeCashFlowBalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="ComparativeCashFlowStatementCsv"> + <section> + <actions> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="viewSize" value="99999"/> + <set field="titleProperty" value="AccountingComparativeCashFlowStatement"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="ComparativeCashFlowStatement"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId" type="String"/> + <service service-name="getPartyAccountingPreferences" result-map="result"> + <field-map field-name="organizationPartyId"/> + </service> + <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/> + <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/> + + <!-- Get a default fromDate --> + <service service-name="findLastClosedDate" result-map="findLastClosedDateOutMap"> + <field-map field-name="organizationPartyId" from-field="organizationPartyId"/> + </service> + + <set field="period1FromDate" from-field="parameters.period1FromDate" type="Timestamp" default-value="${findLastClosedDateOutMap.lastClosedDate}"/> + <set field="period1ThruDate" from-field="parameters.period1ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period1GlFiscalTypeId" from-field="parameters.period1GlFiscalTypeId" default-value="ACTUAL"/> + <set field="fromDate" from-field="period1FromDate"/> + <set field="thruDate" from-field="period1ThruDate"/> + <set field="glFiscalTypeId" from-field="period1GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy"/> + <set field="openingCashBalanceList1" from-field="openingCashBalanceList"/> + <set field="periodCashBalanceList1" from-field="periodCashBalanceList"/> + <set field="closingCashBalanceList1" from-field="closingCashBalanceList"/> + <set field="cashFlowBalanceTotalList1" from-field="cashFlowBalanceTotalList"/> + + <set field="period2FromDate" from-field="parameters.period2FromDate" type="Timestamp" default-value="${findLastClosedDateOutMap.lastClosedDate}"/> + <set field="period2ThruDate" from-field="parameters.period2ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period2GlFiscalTypeId" from-field="parameters.period2GlFiscalTypeId" default-value="ACTUAL"/> + <set field="fromDate" from-field="period2FromDate"/> + <set field="thruDate" from-field="period2ThruDate"/> + <set field="glFiscalTypeId" from-field="period2GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy"/> + <set field="openingCashBalanceList2" from-field="openingCashBalanceList"/> + <set field="periodCashBalanceList2" from-field="periodCashBalanceList"/> + <set field="closingCashBalanceList2" from-field="closingCashBalanceList"/> + <set field="cashFlowBalanceTotalList2" from-field="cashFlowBalanceTotalList"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeCashFlowStatement.groovy"/> + </actions> + <widgets> + <label style="h3" text="${uiLabelMap.AccountingOpeningCashBalance}"/> + <include-form name="ComparativeCashFlowStatementOpeningCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingPeriodCashBalance}"/> + <include-form name="ComparativeCashFlowStatementPeriodCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingClosingCashBalance}"/> + <include-form name="ComparativeCashFlowStatementClosingCashBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="ComparativeCashFlowBalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </widgets> + </section> + </screen> + </screens> |
| Free forum by Nabble | Edit this page |
