|
Modified: ofbiz/branches/addbirt/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=889851&r1=889850&r2=889851&view=diff ============================================================================== --- ofbiz/branches/addbirt/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original) +++ ofbiz/branches/addbirt/applications/accounting/widget/ReportFinancialSummaryScreens.xml Fri Dec 11 23:11:39 2009 @@ -211,6 +211,7 @@ <screen name="TrialBalance"> <section> <actions> + <set field="viewSize" value="99999"/> <set field="titleProperty" value="AccountingTrialBalance"/> <set field="tabButtonItem" value="OrganizationAccountingReports"/> <set field="tabButtonItem2" value="TrialBalance"/> @@ -273,58 +274,85 @@ </section> </screen> - <screen name="IncomeStatement"> + <screen name="TrialBalanceSearchResultsCsv"> <section> <actions> - <set field="titleProperty" value="AccountingIncomeStatement"/> - <set field="tabButtonItem" value="OrganizationAccountingReports"/> - <set field="tabButtonItem2" value="IncomeStatement"/> + <set field="viewSize" value="99999"/> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> <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"/> - <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy"/> + <set field="partyIds" value="${groovy:org.ofbiz.party.party.PartyWorker.getAssociatedPartyIdsByRelationshipType(delegator, organizationPartyId, 'GROUP_ROLLUP')}" type="List"/> + <entity-condition entity-name="Party" list="parties"> + <condition-expr field-name="partyId" operator="in" from-field="partyIds"/> + </entity-condition> + <set field="partyIds[]" from-field="organizationPartyId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy"/> + <entity-condition entity-name="GlAccountAndHistoryTotals" filter-by-date="false" list="grandTotalPosted"> + <condition-list> + <condition-expr field-name="organizationPartyId" operator="in" from-field="partyIds"/> + <condition-expr field-name="customTimePeriodId" operator="equals" from-field="parameters.customTimePeriodId"/> + </condition-list> + <select-field field-name="totalPostedDebits"/> + <select-field field-name="totalPostedCredits"/> + </entity-condition> + <set field="grandTotalPostedRecord" from-field="grandTotalPosted[0]"/> </actions> <widgets> - <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}"> + <container> + <include-form name="TrialBalanceReport" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </container> + </widgets> + </section> + </screen> + + <screen name="TrialBalanceSearchResultsPdf"> + <section> + <actions> + <set field="viewSize" value="99999"/> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> + <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"/> + <set field="partyIds" value="${groovy:org.ofbiz.party.party.PartyWorker.getAssociatedPartyIdsByRelationshipType(delegator, organizationPartyId, 'GROUP_ROLLUP')}" type="List"/> + <entity-condition entity-name="Party" list="parties"> + <condition-expr field-name="partyId" operator="in" from-field="partyIds"/> + </entity-condition> + <set field="partyIds[]" from-field="organizationPartyId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy"/> + <entity-condition entity-name="GlAccountAndHistoryTotals" filter-by-date="false" list="grandTotalPosted"> + <condition-list> + <condition-expr field-name="organizationPartyId" operator="in" from-field="partyIds"/> + <condition-expr field-name="customTimePeriodId" operator="equals" from-field="parameters.customTimePeriodId"/> + </condition-list> + <select-field field-name="totalPostedDebits"/> + <select-field field-name="totalPostedCredits"/> + </entity-condition> + <set field="grandTotalPostedRecord" from-field="grandTotalPosted[0]"/> + </actions> + <widgets> + <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> <decorator-section name="body"> - <screenlet title="${uiLabelMap.AccountingIncomeStatement}"> - <include-form name="IncomeStatementParameters" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - <section> - <condition> - <not><if-empty field="totalNetIncome"/></not> - </condition> - <widgets> - <screenlet title="${uiLabelMap.AccountingIncomeStatement}"> - <link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="IncomeStatementListCsv.csv"> - <parameter param-name="fromDate" from-field="parameters.fromDate"/> - <parameter param-name="thruDate" from-field="parameters.thruDate"/> - <parameter param-name="isIncomeStatement" value="true"/> - <parameter param-name="selectedMonth" from-field="parameters.selectedMonth"/> - <parameter param-name="organizationPartyId" from-field="parameters.organizationPartyId"/> - <parameter param-name="glFiscalTypeId" from-field="parameters.glFiscalTypeId"/> - </link> - <link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="IncomeStatementListPdf.pdf"> - <parameter param-name="fromDate" from-field="parameters.fromDate"/> - <parameter param-name="thruDate" from-field="parameters.thruDate"/> - <parameter param-name="isIncomeStatement" value="true"/> - <parameter param-name="selectedMonth" from-field="parameters.selectedMonth"/> - <parameter param-name="organizationPartyId" from-field="parameters.organizationPartyId"/> - <parameter param-name="glFiscalTypeId" from-field="parameters.glFiscalTypeId"/> - </link> - <container style="h3"><label text="${uiLabelMap.AccountingIncome}"/></container> - <include-form name="IncomeStatementList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <container style="h3"><label text="${uiLabelMap.AccountingExpenses}"/></container> - <include-form name="ExpenseStatementList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - <container> - <label style="h3" text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/> - </container> - </widgets> - </section> + <container style="h3"> + <label text="${uiLabelMap.AccountingTrialBalance}"/> + </container> + <container style="h3"> + <label text="${uiLabelMap.AccountingConsolidatedDataFromDivisions}"/> + </container> + <include-form name="TrialBalanceFinancialTimePeriodSelection" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <include-form name="TrialBalanceReport" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <container style="h3"> + <label text="${uiLabelMap.AccountingDebitFlag}: ${grandTotalPostedRecord.totalPostedDebits}"/> + </container> + <container style="h3"> + <label text="${uiLabelMap.AccountingCreditFlag}: ${grandTotalPostedRecord.totalPostedCredits}"/> + </container> </decorator-section> </decorator-screen> </widgets> @@ -334,6 +362,7 @@ <screen name="BalanceSheet"> <section> <actions> + <set field="viewSize" value="99999"/> <set field="titleProperty" value="AccountingBalanceSheet"/> <set field="tabButtonItem" value="OrganizationAccountingReports"/> <set field="tabButtonItem2" value="BalanceSheet"/> @@ -343,9 +372,9 @@ </service> <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/> <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/> - <set field="assetBalancesList" from-field="parameters.assetBalancesList"/> - <set field="liabilityBalancesList" from-field="parameters.liabilityBalancesList"/> - <set field="equityBalancesList" from-field="parameters.equityBalancesList"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> </actions> <widgets> <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}"> @@ -353,45 +382,96 @@ <screenlet title="${uiLabelMap.AccountingBalanceSheet}"> <include-form name="BalanceSheetParameters" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> </screenlet> - <section> - <condition> - <or> - <not><if-empty field="assetBalancesList"/></not> - <not><if-empty field="liabilityBalancesList"/></not> - <not><if-empty field="equityBalancesList"/></not> - </or> - </condition> - <widgets> - <link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="BalanceSheet.csv"> - <parameter param-name="organizationPartyId"/> - <parameter param-name="thruDate" from-field="parameters.thruDate"/> - <parameter param-name="glFiscalTypeId" from-field="parameters.glFiscalTypeId"/> - </link> - <link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="BalanceSheet.pdf"> - <parameter param-name="organizationPartyId"/> - <parameter param-name="thruDate" from-field="parameters.thruDate"/> - <parameter param-name="glFiscalTypeId" from-field="parameters.glFiscalTypeId"/> - </link> - <screenlet title="${uiLabelMap.AccountingAssets}"> - <include-form name="BalanceSheetAssetList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.AccountingLiabilities}"> - <include-form name="BalanceSheetLiabilityList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.AccountingEquities}"> - <include-form name="BalanceSheetEquityList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - </widgets> - </section> + <link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="BalanceSheet.csv"> + <parameter param-name="organizationPartyId"/> + <parameter param-name="thruDate" from-field="parameters.thruDate"/> + <parameter param-name="glFiscalTypeId" from-field="glFiscalTypeId"/> + </link> + <link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="BalanceSheet.pdf"> + <parameter param-name="organizationPartyId"/> + <parameter param-name="thruDate" from-field="parameters.thruDate"/> + <parameter param-name="glFiscalTypeId" from-field="glFiscalTypeId"/> + </link> + <screenlet title="${uiLabelMap.AccountingBalanceSheet}"> + <label style="h3" text="${uiLabelMap.AccountingAssets}"/> + <include-form name="BalanceSheetAssets" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingLiabilities}"/> + <include-form name="BalanceSheetLiabilities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingEquities}"/> + <include-form name="BalanceSheetEquities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="BalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> </decorator-section> </decorator-screen> </widgets> </section> </screen> + <screen name="BalanceSheetPdf"> + <section> + <actions> + <set field="viewSize" value="99999"/> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> + <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"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> + </actions> + <widgets> + <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="body"> + <container> + <label style="h1" text="${uiLabelMap.AccountingBalanceSheet}"/> + <include-form name="BalanceSheetParameters" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingAssets}"/> + <include-form name="BalanceSheetAssets" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingLiabilities}"/> + <include-form name="BalanceSheetLiabilities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingEquities}"/> + <include-form name="BalanceSheetEquities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="BalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="BalanceSheetCsv"> + <section> + <actions> + <set field="viewSize" value="99999"/> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> + <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"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> + </actions> + <widgets> + <label style="h3" text="${uiLabelMap.AccountingAssets}"/> + <include-form name="BalanceSheetAssets" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingLiabilities}"/> + <include-form name="BalanceSheetLiabilities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingEquities}"/> + <include-form name="BalanceSheetEquities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </widgets> + </section> + </screen> <screen name="ComparativeBalanceSheet"> <section> <actions> + <set field="viewSize" value="99999"/> <set field="titleProperty" value="AccountingComparativeBalanceSheet"/> <set field="tabButtonItem" value="OrganizationAccountingReports"/> <set field="tabButtonItem2" value="ComparativeBalanceSheet"/> @@ -401,9 +481,43 @@ </service> <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/> <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/> - <set field="assetBalancesList" from-field="parameters.assetBalancesList"/> - <set field="liabilityBalancesList" from-field="parameters.liabilityBalancesList"/> - <set field="equityBalancesList" from-field="parameters.equityBalancesList"/> + + <set field="period1ThruDate" from-field="parameters.period1ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period1GlFiscalTypeId" from-field="parameters.period1GlFiscalTypeId" default-value="ACTUAL"/> + <set field="thruDate" from-field="period1ThruDate" type="Timestamp"/> + <set field="glFiscalTypeId" from-field="period1GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> + <set field="assetAccountBalanceList1" from-field="assetAccountBalanceList"/> + <set field="liabilityAccountBalanceList1" from-field="liabilityAccountBalanceList"/> + <set field="equityAccountBalanceList1" from-field="equityAccountBalanceList"/> + <set field="assetBalanceTotal1" from-field="assetBalanceTotal"/> + <set field="currentAssetBalanceTotal1" from-field="currentAssetBalanceTotal"/> + <set field="longtermAssetBalanceTotal1" from-field="longtermAssetBalanceTotal"/> + <set field="liabilityBalanceTotal1" from-field="liabilityBalanceTotal"/> + <set field="currentLiabilityBalanceTotal1" from-field="currentLiabilityBalanceTotal"/> + <set field="equityBalanceTotal1" from-field="equityBalanceTotal"/> + <set field="liabilityEquityBalanceTotal1" from-field="liabilityEquityBalanceTotal"/> + <set field="balanceTotalList1" from-field="balanceTotalList"/> + + <set field="period2ThruDate" from-field="parameters.period2ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period2GlFiscalTypeId" from-field="parameters.period2GlFiscalTypeId" default-value="ACTUAL"/> + <set field="thruDate" from-field="period2ThruDate" type="Timestamp"/> + <set field="glFiscalTypeId" from-field="period2GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> + <set field="assetAccountBalanceList2" from-field="assetAccountBalanceList"/> + <set field="liabilityAccountBalanceList2" from-field="liabilityAccountBalanceList"/> + <set field="equityAccountBalanceList2" from-field="equityAccountBalanceList"/> + <set field="assetBalanceTotal2" from-field="assetBalanceTotal"/> + <set field="currentAssetBalanceTotal2" from-field="currentAssetBalanceTotal"/> + <set field="longtermAssetBalanceTotal2" from-field="longtermAssetBalanceTotal"/> + <set field="liabilityBalanceTotal2" from-field="liabilityBalanceTotal"/> + <set field="currentLiabilityBalanceTotal2" from-field="currentLiabilityBalanceTotal"/> + <set field="equityBalanceTotal2" from-field="equityBalanceTotal"/> + <set field="liabilityEquityBalanceTotal2" from-field="liabilityEquityBalanceTotal"/> + <set field="balanceTotalList2" from-field="balanceTotalList"/> + + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeBalanceSheet.groovy"/> + </actions> <widgets> <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}"> @@ -411,36 +525,177 @@ <screenlet title="${uiLabelMap.AccountingComparativeBalanceSheet}"> <include-form name="ComparativeBalanceSheetParameters" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> </screenlet> - <section> - <condition> - <or> - <not><if-empty field="assetBalancesList"/></not> - <not><if-empty field="liabilityBalancesList"/></not> - <not><if-empty field="equityBalancesList"/></not> - </or> - </condition> - <widgets> - <screenlet title="${uiLabelMap.AccountingAssets}"> - <include-form name="BalanceSheetAssetList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.AccountingLiabilities}"> - <include-form name="BalanceSheetLiabilityList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.AccountingEquities}"> - <include-form name="BalanceSheetEquityList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - </widgets> - </section> + <link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="ComparativeBalanceSheet.csv"> + <parameter param-name="organizationPartyId"/> + <parameter param-name="period1ThruDate"/> + <parameter param-name="period1GlFiscalTypeId"/> + <parameter param-name="period2ThruDate"/> + <parameter param-name="period2GlFiscalTypeId"/> + </link> + <link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="ComparativeBalanceSheet.pdf"> + <parameter param-name="organizationPartyId"/> + <parameter param-name="period1ThruDate"/> + <parameter param-name="period1GlFiscalTypeId"/> + <parameter param-name="period2ThruDate"/> + <parameter param-name="period2GlFiscalTypeId" from-field="period2GlFiscalTypeId"/> + </link> + <screenlet title="${uiLabelMap.AccountingComparativeBalanceSheet}"> + <label style="h3" text="${uiLabelMap.AccountingAssets}"/> + <include-form name="ComparativeBalanceSheetAssets" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingLiabilities}"/> + <include-form name="ComparativeBalanceSheetLiabilities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingEquities}"/> + <include-form name="ComparativeBalanceSheetEquities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="ComparativeBalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> </decorator-section> </decorator-screen> </widgets> </section> </screen> - <!-- TODO: this is just a placeholder: the report is not still implemented --> + <screen name="ComparativeBalanceSheetPdf"> + <section> + <actions> + <set field="viewSize" value="99999"/> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="titleProperty" value="AccountingComparativeBalanceSheet"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="ComparativeBalanceSheet"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> + <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"/> + + <set field="period1ThruDate" from-field="parameters.period1ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period1GlFiscalTypeId" from-field="parameters.period1GlFiscalTypeId" default-value="ACTUAL"/> + <set field="thruDate" from-field="period1ThruDate" type="Timestamp"/> + <set field="glFiscalTypeId" from-field="period1GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> + <set field="assetAccountBalanceList1" from-field="assetAccountBalanceList"/> + <set field="liabilityAccountBalanceList1" from-field="liabilityAccountBalanceList"/> + <set field="equityAccountBalanceList1" from-field="equityAccountBalanceList"/> + <set field="assetBalanceTotal1" from-field="assetBalanceTotal"/> + <set field="currentAssetBalanceTotal1" from-field="currentAssetBalanceTotal"/> + <set field="longtermAssetBalanceTotal1" from-field="longtermAssetBalanceTotal"/> + <set field="liabilityBalanceTotal1" from-field="liabilityBalanceTotal"/> + <set field="currentLiabilityBalanceTotal1" from-field="currentLiabilityBalanceTotal"/> + <set field="equityBalanceTotal1" from-field="equityBalanceTotal"/> + <set field="liabilityEquityBalanceTotal1" from-field="liabilityEquityBalanceTotal"/> + <set field="balanceTotalList1" from-field="balanceTotalList"/> + + <set field="period2ThruDate" from-field="parameters.period2ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period2GlFiscalTypeId" from-field="parameters.period2GlFiscalTypeId" default-value="ACTUAL"/> + <set field="thruDate" from-field="period2ThruDate" type="Timestamp"/> + <set field="glFiscalTypeId" from-field="period2GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> + <set field="assetAccountBalanceList2" from-field="assetAccountBalanceList"/> + <set field="liabilityAccountBalanceList2" from-field="liabilityAccountBalanceList"/> + <set field="equityAccountBalanceList2" from-field="equityAccountBalanceList"/> + <set field="assetBalanceTotal2" from-field="assetBalanceTotal"/> + <set field="currentAssetBalanceTotal2" from-field="currentAssetBalanceTotal"/> + <set field="longtermAssetBalanceTotal2" from-field="longtermAssetBalanceTotal"/> + <set field="liabilityBalanceTotal2" from-field="liabilityBalanceTotal"/> + <set field="currentLiabilityBalanceTotal2" from-field="currentLiabilityBalanceTotal"/> + <set field="equityBalanceTotal2" from-field="equityBalanceTotal"/> + <set field="liabilityEquityBalanceTotal2" from-field="liabilityEquityBalanceTotal"/> + <set field="balanceTotalList2" from-field="balanceTotalList"/> + + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeBalanceSheet.groovy"/> + + </actions> + <widgets> + <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="body"> + <container> + <label style="h1" text="${uiLabelMap.AccountingComparativeBalanceSheet}"/> + <include-form name="ComparativeBalanceSheetParametersOneColumn" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingAssets}"/> + <include-form name="ComparativeBalanceSheetAssets" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingLiabilities}"/> + <include-form name="ComparativeBalanceSheetLiabilities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingEquities}"/> + <include-form name="ComparativeBalanceSheetEquities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="ComparativeBalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="ComparativeBalanceSheetCsv"> + <section> + <actions> + <set field="viewSize" value="99999"/> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="titleProperty" value="AccountingComparativeBalanceSheet"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="ComparativeBalanceSheet"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> + <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"/> + + <set field="period1ThruDate" from-field="parameters.period1ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period1GlFiscalTypeId" from-field="parameters.period1GlFiscalTypeId" default-value="ACTUAL"/> + <set field="thruDate" from-field="period1ThruDate" type="Timestamp"/> + <set field="glFiscalTypeId" from-field="period1GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> + <set field="assetAccountBalanceList1" from-field="assetAccountBalanceList"/> + <set field="liabilityAccountBalanceList1" from-field="liabilityAccountBalanceList"/> + <set field="equityAccountBalanceList1" from-field="equityAccountBalanceList"/> + <set field="assetBalanceTotal1" from-field="assetBalanceTotal"/> + <set field="currentAssetBalanceTotal1" from-field="currentAssetBalanceTotal"/> + <set field="longtermAssetBalanceTotal1" from-field="longtermAssetBalanceTotal"/> + <set field="liabilityBalanceTotal1" from-field="liabilityBalanceTotal"/> + <set field="currentLiabilityBalanceTotal1" from-field="currentLiabilityBalanceTotal"/> + <set field="equityBalanceTotal1" from-field="equityBalanceTotal"/> + <set field="liabilityEquityBalanceTotal1" from-field="liabilityEquityBalanceTotal"/> + <set field="balanceTotalList1" from-field="balanceTotalList"/> + + <set field="period2ThruDate" from-field="parameters.period2ThruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="period2GlFiscalTypeId" from-field="parameters.period2GlFiscalTypeId" default-value="ACTUAL"/> + <set field="thruDate" from-field="period2ThruDate" type="Timestamp"/> + <set field="glFiscalTypeId" from-field="period2GlFiscalTypeId"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy"/> + <set field="assetAccountBalanceList2" from-field="assetAccountBalanceList"/> + <set field="liabilityAccountBalanceList2" from-field="liabilityAccountBalanceList"/> + <set field="equityAccountBalanceList2" from-field="equityAccountBalanceList"/> + <set field="assetBalanceTotal2" from-field="assetBalanceTotal"/> + <set field="currentAssetBalanceTotal2" from-field="currentAssetBalanceTotal"/> + <set field="longtermAssetBalanceTotal2" from-field="longtermAssetBalanceTotal"/> + <set field="liabilityBalanceTotal2" from-field="liabilityBalanceTotal"/> + <set field="currentLiabilityBalanceTotal2" from-field="currentLiabilityBalanceTotal"/> + <set field="equityBalanceTotal2" from-field="equityBalanceTotal"/> + <set field="liabilityEquityBalanceTotal2" from-field="liabilityEquityBalanceTotal"/> + <set field="balanceTotalList2" from-field="balanceTotalList"/> + + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeBalanceSheet.groovy"/> + + </actions> + <widgets> + <label style="h3" text="${uiLabelMap.AccountingAssets}"/> + <include-form name="ComparativeBalanceSheetAssets" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingLiabilities}"/> + <include-form name="ComparativeBalanceSheetLiabilities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingEquities}"/> + <include-form name="ComparativeBalanceSheetEquities" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="ComparativeBalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </widgets> + </section> + </screen> + <screen name="TransactionTotals"> <section> <actions> + <set field="viewSize" value="99999"/> <set field="titleProperty" value="AccountingTransactionTotals"/> <set field="labelTitleProperty" value="AccountingTransactionTotals"/> <set field="tabButtonItem" value="OrganizationAccountingReports"/> @@ -451,46 +706,54 @@ <service service-name="getPartyAccountingPreferences" result-map="result" auto-field-map="true"/> <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/> <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/> - <set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/> - <set field="thruDate" from-field="parameters.thruDate" type="Timestamp"/> + <!-- Get a default fromDate --> + <service service-name="findLastClosedDate" result-map="findLastClosedDateOutMap"> + <field-map field-name="organizationPartyId" from-field="organizationPartyId"/> + </service> + <set field="fromDate" from-field="parameters.fromDate" type="Timestamp" default-value="${findLastClosedDateOutMap.lastClosedDate}"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthSelection.groovy"/> <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy"/> </actions> <widgets> <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <screenlet title="${uiLabelMap.AccountingTransactionTotals}"> - <include-form name="FindTransactionTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <include-form name="TransactionSelectionForm" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> </screenlet> <section> <condition> - <or> - <not><if-empty field="postedTransTotalList"/></not> - <not><if-empty field="unpostedTransTotalList"/></not> - <not><if-empty field="postedAndUnpostedTransTotalList"/></not> - </or> + <and> + <not><if-empty field="fromDate"/></not> + <not><if-empty field="thruDate"/></not> + <not><if-empty field="organizationPartyId"/></not> + </and> </condition> <widgets> <link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="TransactionTotalsCsv.csv"> <parameter param-name="fromDate"/> <parameter param-name="thruDate"/> + <parameter param-name="glFiscalTypeId"/> <parameter param-name="organizationPartyId"/> </link> <link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="TransactionTotalsPdf.pdf"> <parameter param-name="fromDate"/> <parameter param-name="thruDate"/> + <parameter param-name="glFiscalTypeId"/> <parameter param-name="organizationPartyId"/> </link> + <screenlet title="${uiLabelMap.AccountingPostedTransactionTotals}"> + <include-form name="PostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.AccountingUnPostedTransactionTotals}"> + <include-form name="UnpostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.AccountingPostedAndUnpostedTransactionTotals}"> + <include-form name="PostedAndUnpostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> </widgets> </section> - <screenlet title="${uiLabelMap.AccountingPostedTransactionTotals}"> - <include-form name="PostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.AccountingUnPostedTransactionTotals}"> - <include-form name="UnpostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> - <screenlet title="${uiLabelMap.AccountingPostedAndUnpostedTransactionTotals}"> - <include-form name="PostedAndUnpostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </screenlet> </decorator-section> </decorator-screen> </widgets> @@ -500,18 +763,28 @@ <screen name="TransactionTotalsPdf"> <section> <actions> + <set field="viewSize" value="99999"/> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="titleProperty" value="AccountingTransactionTotals"/> + <set field="labelTitleProperty" value="AccountingTransactionTotals"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="TransactionTotals"/> <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"/> - <set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/> - <set field="thruDate" from-field="parameters.thruDate" type="Timestamp"/> + <service service-name="getPartyAccountingPreferences" result-map="result" auto-field-map="true"/> + <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/> + <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/> + <set field="fromDate" from-field="parameters.fromDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy"/> </actions> <widgets> <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> <decorator-section name="body"> <container> + <include-form name="FindTransactionTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> <label text="${uiLabelMap.AccountingPostedTransactionTotals}"/> <include-form name="PostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> <label text="${uiLabelMap.AccountingUnPostedTransactionTotals}"/> @@ -528,198 +801,400 @@ <screen name="TransactionTotalsCsv"> <section> <actions> + <set field="viewSize" value="99999"/> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="titleProperty" value="AccountingTransactionTotals"/> + <set field="labelTitleProperty" value="AccountingTransactionTotals"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="TransactionTotals"/> <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"/> - <set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/> - <set field="thruDate" from-field="parameters.thruDate" type="Timestamp"/> + <service service-name="getPartyAccountingPreferences" result-map="result" auto-field-map="true"/> + <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/> + <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/> + <set field="fromDate" from-field="parameters.fromDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy"/> </actions> <widgets> <label text="${uiLabelMap.AccountingPostedTransactionTotals}"/> - <include-form name="PostedTransactionTotalListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <include-form name="PostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> <label text="${uiLabelMap.AccountingPostedTransactionTotals}"/> - <include-form name="UnpostedTransactionTotalListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <include-form name="UnpostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> <label text="${uiLabelMap.AccountingPostedTransactionTotals}"/> - <include-form name="PostedAndUnpostedTransactionTotalListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <include-form name="PostedAndUnpostedTransactionTotalList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> </widgets> </section> </screen> - <screen name="IncomeStatementListPdf"> + <screen name="IncomeStatement"> <section> <actions> - <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="viewSize" value="99999"/> + <set field="titleProperty" value="AccountingIncomeStatement"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="IncomeStatement"/> <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> - <set field="isPdf" value="true" type="Boolean"/> - <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy"/> + <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="fromDate" from-field="parameters.fromDate" type="Timestamp" default-value="${findLastClosedDateOutMap.lastClosedDate}"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp" default-value="${nowTimestamp}"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthSelection.groovy"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy"/> </actions> <widgets> - <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <container style="h3"><label text="${uiLabelMap.AccountingIncome}"/></container> - <include-form name="IncomeStatementList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <container style="h3"><label text="${uiLabelMap.AccountingExpenses}"/></container> - <include-form name="ExpenseStatementList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <container><label style="h3" text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/></container> + <screenlet title="${uiLabelMap.AccountingIncomeStatement}"> + <include-form name="TransactionSelectionForm" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.AccountingIncomeStatement}"> + <link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="IncomeStatementListCsv.csv"> + <parameter param-name="fromDate" from-field="fromDate"/> + <parameter param-name="thruDate" from-field="thruDate"/> + <parameter param-name="organizationPartyId" from-field="parameters.organizationPartyId"/> + <parameter param-name="glFiscalTypeId" from-field="glFiscalTypeId"/> + </link> + <link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="IncomeStatementListPdf.pdf"> + <parameter param-name="fromDate" from-field="fromDate"/> + <parameter param-name="thruDate" from-field="thruDate"/> + <parameter param-name="organizationPartyId" from-field="parameters.organizationPartyId"/> + <parameter param-name="glFiscalTypeId" from-field="glFiscalTypeId"/> + </link> + <label style="h3" text="${uiLabelMap.AccountingRevenues}"/> + <include-form name="IncomeStatementRevenues" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingExpenses}"/> + <include-form name="IncomeStatementExpenses" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingIncome}"/> + <include-form name="IncomeStatementIncome" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="BalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> </decorator-section> </decorator-screen> </widgets> </section> </screen> - <screen name="IncomeStatementListCsv"> + <screen name="IncomeStatementListPdf"> <section> <actions> + <set field="viewSize" value="99999"/> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> - <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy"/> + <set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy"/> </actions> <widgets> - <container><label text="${uiLabelMap.AccountingIncome}"/></container> - <include-form name="IncomeStatementListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <container><label text="${uiLabelMap.AccountingExpenses}"/></container> - <include-form name="ExpenseStatementListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <container><label text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/></container> + <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="body"> + <container> + <label style="h1" text="${uiLabelMap.AccountingIncomeStatement}"/> + <include-form name="FindTransactionTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingRevenues}"/> + <include-form name="IncomeStatementRevenues" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingExpenses}"/> + <include-form name="IncomeStatementExpenses" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingIncome}"/> + <include-form name="IncomeStatementIncome" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="BalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </container> + </decorator-section> + </decorator-screen> </widgets> </section> </screen> - <screen name="BalanceSheetCsv"> + <screen name="IncomeStatementListCsv"> <section> <actions> + <set field="viewSize" value="99999"/> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> - - <service service-name="prepareBalanceSheet" result-map="result" auto-field-map="true"/> - <set field="assetBalancesList" from-field="result.assetBalancesList"/> - <set field="liabilityBalancesList" from-field="result.liabilityBalancesList"/> - <set field="equityBalancesList" from-field="result.equityBalancesList"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> + <set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/> + <set field="thruDate" from-field="parameters.thruDate" type="Timestamp"/> + <set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy"/> </actions> <widgets> - <container style="h3"> - <label text="${uiLabelMap.AccountingAssets}"/> - <include-form name="BalanceSheetAssetListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <label text="${uiLabelMap.AccountingLiabilities}"/> - <include-form name="BalanceSheetLiabilityListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <label text="${uiLabelMap.AccountingEquities}"/> - <include-form name="BalanceSheetEquityListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </container> + <label style="h3" text="${uiLabelMap.AccountingRevenues}"/> + <include-form name="IncomeStatementRevenues" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingExpenses}"/> + <include-form name="IncomeStatementExpenses" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingIncome}"/> + <include-form name="IncomeStatementIncome" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="BalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> </widgets> </section> </screen> - <screen name="BalanceSheetPdf"> + <screen name="ComparativeIncomeStatement"> <section> <actions> - <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="viewSize" value="99999"/> + <set field="titleProperty" value="AccountingComparativeIncomeStatement"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="ComparativeIncomeStatement"/> + <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> - <service service-name="prepareBalanceSheet" result-map="result" auto-field-map="true"/> - <set field="assetBalancesList" from-field="result.assetBalancesList"/> - <set field="liabilityBalancesList" from-field="result.liabilityBalancesList"/> - <set field="equityBalancesList" from-field="result.equityBalancesList"/> - <set field="isPdf" value="true" type="Boolean"/> + <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/IncomeStatement.groovy"/> + <set field="revenueAccountBalanceList1" from-field="revenueAccountBalanceList"/> + <set field="revenueAccountBalanceTotal1" from-field="revenueAccountBalanceTotal"/> + <set field="expenseAccountBalanceList1" from-field="expenseAccountBalanceList"/> + <set field="expenseAccountBalanceTotal1" from-field="expenseAccountBalanceTotal"/> + <set field="cogsExpense1" from-field="cogsExpense"/> + <set field="incomeAccountBalanceList1" from-field="incomeAccountBalanceList"/> + <set field="incomeAccountBalanceTotal1" from-field="incomeAccountBalanceTotal"/> + <set field="grossMargin1" from-field="grossMargin"/> + <set field="sgaExpense1" from-field="sgaExpense"/> + <set field="incomeFromOperations1" from-field="incomeFromOperations"/> + <set field="netIncome1" from-field="netIncome"/> + <set field="balanceTotalList1" from-field="balanceTotalList"/> + + <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/IncomeStatement.groovy"/> + <set field="revenueAccountBalanceList2" from-field="revenueAccountBalanceList"/> + <set field="revenueAccountBalanceTotal2" from-field="revenueAccountBalanceTotal"/> + <set field="expenseAccountBalanceList2" from-field="expenseAccountBalanceList"/> + <set field="expenseAccountBalanceTotal2" from-field="expenseAccountBalanceTotal"/> + <set field="cogsExpense2" from-field="cogsExpense"/> + <set field="incomeAccountBalanceList2" from-field="incomeAccountBalanceList"/> + <set field="incomeAccountBalanceTotal2" from-field="incomeAccountBalanceTotal"/> + <set field="grossMargin2" from-field="grossMargin"/> + <set field="sgaExpense2" from-field="sgaExpense"/> + <set field="incomeFromOperations2" from-field="incomeFromOperations"/> + <set field="netIncome2" from-field="netIncome"/> + <set field="balanceTotalList2" from-field="balanceTotalList"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeIncomeStatement.groovy"/> </actions> <widgets> - <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <section> - <widgets> - <container> - <label text="${uiLabelMap.AccountingAssets}"/> - <include-form name="BalanceSheetAssetList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <label text="${uiLabelMap.AccountingLiabilities}"/> - <include-form name="BalanceSheetLiabilityList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - <label text="${uiLabelMap.AccountingEquities}"/> - <include-form name="BalanceSheetEquityList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </container> - </widgets> - </section> + <screenlet title="${uiLabelMap.AccountingComparativeIncomeStatement}"> + <include-form name="ComparativeIncomeStatementParameters" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.AccountingComparativeIncomeStatement}"> + <link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="ComparativeIncomeStatements.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="ComparativeIncomeStatements.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.AccountingRevenues}"/> + <include-form name="ComparativeIncomeStatementRevenues" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingExpenses}"/> + <include-form name="ComparativeIncomeStatementExpenses" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingIncome}"/> + <include-form name="ComparativeIncomeStatementIncome" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="ComparativeBalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </screenlet> </decorator-section> </decorator-screen> </widgets> </section> </screen> - - <screen name="TrialBalanceSearchResultsCsv"> + <screen name="ComparativeIncomeStatementsPdf"> <section> <actions> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> - <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> + <set field="viewSize" value="99999"/> + <set field="titleProperty" value="AccountingComparativeIncomeStatement"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="ComparativeIncomeStatement"/> + <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"/> - <set field="partyIds" value="${groovy:org.ofbiz.party.party.PartyWorker.getAssociatedPartyIdsByRelationshipType(delegator, organizationPartyId, 'GROUP_ROLLUP')}" type="List"/> - <entity-condition entity-name="Party" list="parties"> - <condition-expr field-name="partyId" operator="in" from-field="partyIds"/> - </entity-condition> - <set field="partyIds[]" from-field="organizationPartyId"/> - <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy"/> - <entity-condition entity-name="GlAccountAndHistoryTotals" filter-by-date="false" list="grandTotalPosted"> - <condition-list> - <condition-expr field-name="organizationPartyId" operator="in" from-field="partyIds"/> - <condition-expr field-name="customTimePeriodId" operator="equals" from-field="parameters.customTimePeriodId"/> - </condition-list> - <select-field field-name="totalPostedDebits"/> - <select-field field-name="totalPostedCredits"/> - </entity-condition> - <set field="grandTotalPostedRecord" from-field="grandTotalPosted[0]"/> + + <!-- 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/IncomeStatement.groovy"/> + <set field="revenueAccountBalanceList1" from-field="revenueAccountBalanceList"/> + <set field="revenueAccountBalanceTotal1" from-field="revenueAccountBalanceTotal"/> + <set field="expenseAccountBalanceList1" from-field="expenseAccountBalanceList"/> + <set field="expenseAccountBalanceTotal1" from-field="expenseAccountBalanceTotal"/> + <set field="cogsExpense1" from-field="cogsExpense"/> + <set field="incomeAccountBalanceList1" from-field="incomeAccountBalanceList"/> + <set field="incomeAccountBalanceTotal1" from-field="incomeAccountBalanceTotal"/> + <set field="grossMargin1" from-field="grossMargin"/> + <set field="sgaExpense1" from-field="sgaExpense"/> + <set field="incomeFromOperations1" from-field="incomeFromOperations"/> + <set field="netIncome1" from-field="netIncome"/> + <set field="balanceTotalList1" from-field="balanceTotalList"/> + + <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/IncomeStatement.groovy"/> + <set field="revenueAccountBalanceList2" from-field="revenueAccountBalanceList"/> + <set field="revenueAccountBalanceTotal2" from-field="revenueAccountBalanceTotal"/> + <set field="expenseAccountBalanceList2" from-field="expenseAccountBalanceList"/> + <set field="expenseAccountBalanceTotal2" from-field="expenseAccountBalanceTotal"/> + <set field="cogsExpense2" from-field="cogsExpense"/> + <set field="incomeAccountBalanceList2" from-field="incomeAccountBalanceList"/> + <set field="incomeAccountBalanceTotal2" from-field="incomeAccountBalanceTotal"/> + <set field="grossMargin2" from-field="grossMargin"/> + <set field="sgaExpense2" from-field="sgaExpense"/> + <set field="incomeFromOperations2" from-field="incomeFromOperations"/> + <set field="netIncome2" from-field="netIncome"/> + <set field="balanceTotalList2" from-field="balanceTotalList"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeIncomeStatement.groovy"/> </actions> <widgets> - <container> - <include-form name="TrialBalanceReport" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> - </container> + <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="body"> + <container> + <label style="h1" text="${uiLabelMap.AccountingComparativeIncomeStatement}"/> + <include-form name="ComparativeIncomeStatementParametersOneColumn" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingRevenues}"/> + <include-form name="ComparativeIncomeStatementRevenues" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingExpenses}"/> + <include-form name="ComparativeIncomeStatementExpenses" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.AccountingIncome}"/> + <include-form name="ComparativeIncomeStatementIncome" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + <label style="h3" text="${uiLabelMap.CommonTotal}"/> + <include-form name="ComparativeBalanceTotals" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </container> + </decorator-section> + </decorator-screen> </widgets> </section> </screen> - <screen name="TrialBalanceSearchResultsPdf"> + <screen name="ComparativeIncomeStatementsCsv"> <section> <actions> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> - <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> + <set field="viewSize" value="99999"/> + <set field="titleProperty" value="AccountingComparativeIncomeStatement"/> + <set field="tabButtonItem" value="OrganizationAccountingReports"/> + <set field="tabButtonItem2" value="ComparativeIncomeStatement"/> + <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"/> - <set field="partyIds" value="${groovy:org.ofbiz.party.party.PartyWorker.getAssociatedPartyIdsByRelationshipType(delegator, organizationPartyId, 'GROUP_ROLLUP')}" type="List"/> - <entity-condition entity-name="Party" list="parties"> - <condition-expr field-name="partyId" operator="in" from-field="partyIds"/> - </entity-condition> - <set field="partyIds[]" from-field="organizationPartyId"/> - <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/TrialBalance.groovy"/> - <entity-condition entity-name="GlAccountAndHistoryTotals" filter-by-date="false" list="grandTotalPosted"> - <condition-list> - <condition-expr field-name="organizationPartyId" operator="in" from-field="partyIds"/> - <condition-expr field-name="customTimePeriodId" operator="equals" from-field="parameters.customTimePeriodId"/> - </condition-list> - <select-field field-name="totalPostedDebits"/> - <select-field field-name="totalPostedCredits"/> - </entity-condition> - <set field="grandTotalPostedRecord" from-field="grandTotalPosted[0]"/> + + <!-- 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/IncomeStatement.groovy"/> + <set field="revenueAccountBalanceList1" from-field="revenueAccountBalanceList"/> + <set field="revenueAccountBalanceTotal1" from-field="revenueAccountBalanceTotal"/> + <set field="expenseAccountBalanceList1" from-field="expenseAccountBalanceList"/> + <set field="expenseAccountBalanceTotal1" from-field="expenseAccountBalanceTotal"/> + <set field="cogsExpense1" from-field="cogsExpense"/> + <set field="incomeAccountBalanceList1" from-field="incomeAccountBalanceList"/> + <set field="incomeAccountBalanceTotal1" from-field="incomeAccountBalanceTotal"/> + <set field="grossMargin1" from-field="grossMargin"/> + <set field="sgaExpense1" from-field="sgaExpense"/> + <set field="incomeFromOperations1" from-field="incomeFromOperations"/> + <set field="netIncome1" from-field="netIncome"/> + <set field="balanceTotalList1" from-field="balanceTotalList"/> + + <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/IncomeStatement.groovy"/> + <set field="revenueAccountBalanceList2" from-field="revenueAccountBalanceList"/> + <set field="revenueAccountBalanceTotal2" from-field="revenueAccountBalanceTotal"/> + <set field="expenseAccountBalanceList2" from-field="expenseAccountBalanceList"/> + <set field="expenseAccountBalanceTotal2" from-field="expenseAccountBalanceTotal"/> + <set field="cogsExpense2" from-field="cogsExpense"/> + <set field="incomeAccountBalanceList2" from-field="incomeAccountBalanceList"/> + <set field="incomeAccountBalanceTotal2" from-field="incomeAccountBalanceTotal"/> + <set field="grossMargin2" from-field="grossMargin"/> + <set field="sgaExpense2" from-field="sgaExpense"/> + <set field="incomeFromOperations2" from-field="incomeFromOperations"/> + <set field="netIncome2" from-field="netIncome"/> + <set field="balanceTotalList2" from-field="balanceTotalList"/> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/ComparativeIncomeStatement.groovy"/> </actions> <widgets> [... 497 lines stripped ...] |
| Free forum by Nabble | Edit this page |
