You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2009/12/08 11:16:43 UTC
svn commit: r888305 - in /ofbiz/trunk/applications/accounting:
webapp/accounting/WEB-INF/actions/reports/ widget/
Author: jacopoc
Date: Tue Dec 8 10:16:42 2009
New Revision: 888305
URL: http://svn.apache.org/viewvc?rev=888305&view=rev
Log:
Renamed report month selection script; misc cleanups and enhancements to financial report screens.
Added:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthSelection.groovy
- copied, changed from r888288, ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy
Removed:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml
Copied: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthSelection.groovy (from r888288, ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthSelection.groovy?p2=ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthSelection.groovy&p1=ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy&r1=888288&r2=888305&rev=888305&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/MonthSelection.groovy Tue Dec 8 10:16:42 2009
@@ -17,51 +17,13 @@
* under the License.
*/
-import java.sql.Timestamp;
import org.ofbiz.base.util.UtilDateTime;
-import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.service.calendar.ExpressionUiHelper;
-
-fromDate=null;
-thruDate=null;
-
-if (parameters.fromDate && parameters.thruDate) {
- fromDate = Timestamp.valueOf(parameters.fromDate);
- thruDate = Timestamp.valueOf(parameters.thruDate);
- context.fromDate = fromDate;
- context.thruDate = thruDate;
-} else if (parameters.selectedMonth) {
+if (parameters.selectedMonth) {
selectedMonth = Integer.valueOf(parameters.selectedMonth);
selectedMonthDate = UtilDateTime.toTimestamp((selectedMonth + 1), 1, UtilDateTime.getYear(UtilDateTime.nowTimestamp(), timeZone, locale), 0, 0, 0);
- fromDate = UtilDateTime.getMonthStart(selectedMonthDate, timeZone, locale);
- thruDate = UtilDateTime.getMonthEnd(selectedMonthDate, timeZone, locale);
-} else {
- context.selectedMonth = UtilDateTime.getMonth(UtilDateTime.nowTimestamp(), timeZone, locale);
+ context.fromDate = UtilDateTime.getMonthStart(selectedMonthDate, timeZone, locale);
+ context.thruDate = UtilDateTime.getMonthEnd(selectedMonthDate, timeZone, locale);
}
-
-if(fromDate && thruDate && organizationPartyId) {
-
- onlyIncludePeriodTypeIdList = [];
- onlyIncludePeriodTypeIdList.add("FISCAL_YEAR");
- customTimePeriodResult = dispatcher.runSync("findCustomTimePeriods", [findDate : thruDate, organizationPartyId : organizationPartyId, onlyIncludePeriodTypeIdList : onlyIncludePeriodTypeIdList, userLogin : userLogin]);
-
- if (customTimePeriodResult) {
- customTimePeriod = EntityUtil.getFirst(customTimePeriodResult.customTimePeriodList);
- if (customTimePeriod) {
- customTimePeriodFromDate = new Timestamp((customTimePeriod.fromDate).getTime());
- customTimePeriodThruDate = new Timestamp((customTimePeriod.thruDate).getTime());
-
- if (customTimePeriodFromDate.compareTo(fromDate) > 0) {
-
- fromDate = customTimePeriodFromDate;
- }
- if (customTimePeriodThruDate.compareTo(thruDate) < 0) {
- thruDate = customTimePeriodThruDate;
- }
- context.financialYearFromDate = customTimePeriodFromDate;
- }
- }
-}
-
context.monthList = ExpressionUiHelper.getMonthValueList(locale);
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy?rev=888305&r1=888304&r2=888305&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy Tue Dec 8 10:16:42 2009
@@ -33,8 +33,8 @@
if (!thruDate) {
thruDate = UtilDateTime.nowTimestamp();
}
-if (!parameters.glFiscalTypeId) {
- parameters.glFiscalTypeId = "ACTUAL";
+if (!glFiscalTypeId) {
+ return;
}
// POSTED
Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=888305&r1=888304&r2=888305&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Tue Dec 8 10:16:42 2009
@@ -81,7 +81,7 @@
<form name="IncomeStatementParameters" type="single" header-row-style="header-row" default-table-style="basic-table">
<field name="selectedMonth" title="${uiLabelMap.CommonMonth}">
- <drop-down>
+ <drop-down allow-empty="true">
<list-options list-name="monthList" key-name="value" description="${description}"/>
</drop-down>
</field>
@@ -502,7 +502,7 @@
<field name="organizationPartyId"><hidden/></field>
<field name="selectedMonth">
- <drop-down>
+ <drop-down allow-empty="true">
<list-options list-name="monthList" key-name="value" description="${description}"/>
</drop-down>
</field>
@@ -653,7 +653,7 @@
<form name="CashFlowStatementParameters" type="single" header-row-style="header-row" default-table-style="basic-table">
<field name="selectedMonth" title="${uiLabelMap.CommonMonth}">
- <drop-down>
+ <drop-down allow-empty="true">
<list-options list-name="monthList" key-name="value" description="${description}"/>
</drop-down>
</field>
Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=888305&r1=888304&r2=888305&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Tue Dec 8 10:16:42 2009
@@ -385,12 +385,12 @@
<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"/>
+ <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="parameters.glFiscalTypeId"/>
+ <parameter param-name="glFiscalTypeId" from-field="glFiscalTypeId"/>
</link>
<screenlet title="${uiLabelMap.AccountingBalanceSheet}">
<label style="h3" text="${uiLabelMap.AccountingAssets}"/>
@@ -712,6 +712,7 @@
</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/TransactionTotals.groovy"/>
</actions>
<widgets>
@@ -732,11 +733,13 @@
<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}">
@@ -773,6 +776,7 @@
<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>
@@ -810,6 +814,7 @@
<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>
@@ -843,7 +848,7 @@
<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/MonthlyTrialBalance.groovy"/>
+ <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>
@@ -1004,22 +1009,22 @@
</screenlet>
<screenlet title="${uiLabelMap.AccountingComparativeIncomeStatement}">
<link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="ComparativeIncomeStatements.csv">
- <parameter param-name="period1FromDate" from-field="parameters.period1FromDate"/>
- <parameter param-name="period1ThruDate" from-field="parameters.period1ThruDate"/>
- <parameter param-name="period1GlFiscalTypeId" from-field="parameters.period1GlFiscalTypeId"/>
- <parameter param-name="period2FromDate" from-field="parameters.period2FromDate"/>
- <parameter param-name="period2ThruDate" from-field="parameters.period2ThruDate"/>
- <parameter param-name="period2GlFiscalTypeId" from-field="parameters.period2GlFiscalTypeId"/>
+ <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="parameters.period1FromDate"/>
- <parameter param-name="period1ThruDate" from-field="parameters.period1ThruDate"/>
- <parameter param-name="period1GlFiscalTypeId" from-field="parameters.period1GlFiscalTypeId"/>
- <parameter param-name="period2FromDate" from-field="parameters.period2FromDate"/>
- <parameter param-name="period2ThruDate" from-field="parameters.period2ThruDate"/>
- <parameter param-name="period2GlFiscalTypeId" from-field="parameters.period2GlFiscalTypeId"/>
+ <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>
@@ -1265,8 +1270,8 @@
<set field="organizationPartyId" from-field="parameters.organizationPartyId" type="String"/>
<set field="partyIds" value="${groovy:org.ofbiz.party.party.PartyWorker.getAssociatedPartyIdsByRelationshipType(delegator, organizationPartyId, 'GROUP_ROLLUP')}" type="List"/>
<set field="partyIds[]" from-field="organizationPartyId"/>
- <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy"/>
- <set field="financialYearFromDate" from-field="financialYearFromDate" type="Timestamp"/>
+ <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>
@@ -1340,8 +1345,8 @@
<set field="organizationPartyId" from-field="parameters.organizationPartyId" type="String"/>
<set field="partyIds" value="${groovy:org.ofbiz.party.party.PartyWorker.getAssociatedPartyIdsByRelationshipType(delegator, organizationPartyId, 'GROUP_ROLLUP')}" type="List"/>
<set field="partyIds[]" from-field="organizationPartyId"/>
- <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy"/>
- <set field="financialYearFromDate" from-field="financialYearFromDate" type="Timestamp"/>
+ <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>
@@ -1607,7 +1612,7 @@
<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/MonthlyTrialBalance.groovy"/>
+ <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthSelection.groovy"/>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy"/>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy"/>
</actions>
@@ -1621,13 +1626,13 @@
<link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="">
<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="organizationPartyId" from-field="organizationPartyId"/>
<parameter param-name="glFiscalTypeId" from-field="glFiscalTypeId"/>
</link>
<link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="">
<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="organizationPartyId" from-field="organizationPartyId"/>
<parameter param-name="glFiscalTypeId" from-field="glFiscalTypeId"/>
</link>
<label style="h3" text="${uiLabelMap.AccountingCashBalance}"/>