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 18:14:19 UTC
svn commit: r888489 - in /ofbiz/trunk/applications/accounting:
webapp/accounting/WEB-INF/ webapp/accounting/WEB-INF/actions/reports/ widget/
Author: jacopoc
Date: Tue Dec 8 17:14:18 2009
New Revision: 888489
URL: http://svn.apache.org/viewvc?rev=888489&view=rev
Log:
Enhanced the "Transaction Totals" financial reports with information about opening and closing balances; removed the "Monthly Trial Balance" report because the same (and improved) information is now available in the "Transaction Totals" report.
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
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/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=888489&r1=888488&r2=888489&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 17:14:18 2009
@@ -19,13 +19,16 @@
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.UtilNumber;
+import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
import org.ofbiz.entity.condition.EntityOperator;
import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.accounting.util.UtilAccounting;
+
import javolution.util.FastList;
-import javolution.util.FastMap;
+
+import java.sql.Date;
if (!fromDate) {
return;
@@ -37,6 +40,14 @@
return;
}
+// Find the last closed time period to get the fromDate for the transactions in the current period and the ending balances of the last closed period
+Map lastClosedTimePeriodResult = dispatcher.runSync("findLastClosedDate", UtilMisc.toMap("organizationPartyId", organizationPartyId, "findDate", new Date(fromDate.getTime()),"userLogin", userLogin));
+Timestamp lastClosedDate = (Timestamp)lastClosedTimePeriodResult.lastClosedDate;
+GenericValue lastClosedTimePeriod = null;
+if (lastClosedDate) {
+ lastClosedTimePeriod = (GenericValue)lastClosedTimePeriodResult.lastClosedTimePeriod;
+}
+
// POSTED
// Posted transactions totals and grand totals
postedTotals = [];
@@ -49,16 +60,50 @@
andExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
andExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate));
andCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND);
-System.out.println("JAC expr: " + andCond);
List postedTransactionTotals = delegator.findList("AcctgTransEntrySums", andCond, UtilMisc.toSet("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount"), UtilMisc.toList("glAccountId"), null, false);
if (postedTransactionTotals) {
Map postedTransactionTotalsMap = [:]
postedTransactionTotals.each { postedTransactionTotal ->
Map accountMap = (Map)postedTransactionTotalsMap.get(postedTransactionTotal.glAccountId);
if (!accountMap) {
- accountMap = UtilMisc.makeMapWritable(postedTransactionTotal);
- accountMap.put("D", BigDecimal.ZERO);
- accountMap.put("C", BigDecimal.ZERO);
+ GenericValue glAccount = delegator.findOne("GlAccount", UtilMisc.toMap("glAccountId", postedTransactionTotal.glAccountId), true);
+ if (glAccount) {
+ boolean isDebitAccount = UtilAccounting.isDebitAccount(glAccount);
+ // Get the opening balances at the end of the last closed time period
+ if (UtilAccounting.isAssetAccount(glAccount) || UtilAccounting.isLiabilityAccount(glAccount) || UtilAccounting.isEquityAccount(glAccount)) {
+ if (lastClosedTimePeriod) {
+ List timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.EQUALS, organizationPartyId));
+ timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, postedTransactionTotal.glAccountId));
+ timePeriodAndExprs.add(EntityCondition.makeCondition("customTimePeriodId", EntityOperator.EQUALS, lastClosedTimePeriod.customTimePeriodId));
+ lastTimePeriodHistory = EntityUtil.getFirst(delegator.findList("GlAccountAndHistory", EntityCondition.makeCondition(timePeriodAndExprs, EntityOperator.AND), null, null, null, false));
+ if (lastTimePeriodHistory) {
+ accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "openingD", lastTimePeriodHistory.getBigDecimal("postedDebits"), "openingC", lastTimePeriodHistory.getBigDecimal("postedCredits"), "D", BigDecimal.ZERO, "C", BigDecimal.ZERO);
+ }
+ }
+ }
+ }
+ if (!accountMap) {
+ accountMap = UtilMisc.makeMapWritable(postedTransactionTotal);
+ accountMap.put("openingD", BigDecimal.ZERO);
+ accountMap.put("openingC", BigDecimal.ZERO);
+ accountMap.put("D", BigDecimal.ZERO);
+ accountMap.put("C", BigDecimal.ZERO);
+ accountMap.put("balance", BigDecimal.ZERO);
+ }
+ //
+ List mainAndExprs = FastList.newInstance();
+ mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
+ mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
+ mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, postedTransactionTotal.glAccountId));
+ mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
+ mainAndExprs.add(EntityCondition.makeCondition("acctgTransTypeId", EntityOperator.NOT_EQUAL, "PERIOD_CLOSING"));
+ mainAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, lastClosedDate));
+ mainAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN, fromDate));
+ transactionTotals = delegator.findList("AcctgTransEntrySums", EntityCondition.makeCondition(mainAndExprs, EntityOperator.AND), UtilMisc.toSet("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount"), UtilMisc.toList("glAccountId"), null, false);
+ transactionTotals.each { transactionTotal ->
+ UtilMisc.addToBigDecimalInMap(accountMap, "opening" + transactionTotal.debitCreditFlag, transactionTotal.amount);
+ }
}
UtilMisc.addToBigDecimalInMap(accountMap, postedTransactionTotal.debitCreditFlag, postedTransactionTotal.amount);
postedTransactionTotalsMap.put(postedTransactionTotal.glAccountId, accountMap);
@@ -118,9 +163,44 @@
unpostedTransactionTotals.each { unpostedTransactionTotal ->
Map accountMap = (Map)unpostedTransactionTotalsMap.get(unpostedTransactionTotal.glAccountId);
if (!accountMap) {
- accountMap = UtilMisc.makeMapWritable(unpostedTransactionTotal);
- accountMap.put("D", BigDecimal.ZERO);
- accountMap.put("C", BigDecimal.ZERO);
+ GenericValue glAccount = delegator.findOne("GlAccount", UtilMisc.toMap("glAccountId", unpostedTransactionTotal.glAccountId), true);
+ if (glAccount) {
+ boolean isDebitAccount = UtilAccounting.isDebitAccount(glAccount);
+ // Get the opening balances at the end of the last closed time period
+ if (UtilAccounting.isAssetAccount(glAccount) || UtilAccounting.isLiabilityAccount(glAccount) || UtilAccounting.isEquityAccount(glAccount)) {
+ if (lastClosedTimePeriod) {
+ List timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.EQUALS, organizationPartyId));
+ timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, unpostedTransactionTotal.glAccountId));
+ timePeriodAndExprs.add(EntityCondition.makeCondition("customTimePeriodId", EntityOperator.EQUALS, lastClosedTimePeriod.customTimePeriodId));
+ lastTimePeriodHistory = EntityUtil.getFirst(delegator.findList("GlAccountAndHistory", EntityCondition.makeCondition(timePeriodAndExprs, EntityOperator.AND), null, null, null, false));
+ if (lastTimePeriodHistory) {
+ accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "openingD", lastTimePeriodHistory.getBigDecimal("postedDebits"), "openingC", lastTimePeriodHistory.getBigDecimal("postedCredits"), "D", BigDecimal.ZERO, "C", BigDecimal.ZERO);
+ }
+ }
+ }
+ }
+ if (!accountMap) {
+ accountMap = UtilMisc.makeMapWritable(unpostedTransactionTotal);
+ accountMap.put("openingD", BigDecimal.ZERO);
+ accountMap.put("openingC", BigDecimal.ZERO);
+ accountMap.put("D", BigDecimal.ZERO);
+ accountMap.put("C", BigDecimal.ZERO);
+ accountMap.put("balance", BigDecimal.ZERO);
+ }
+ //
+ List mainAndExprs = FastList.newInstance();
+ mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
+ mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N"));
+ mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, unpostedTransactionTotal.glAccountId));
+ mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
+ mainAndExprs.add(EntityCondition.makeCondition("acctgTransTypeId", EntityOperator.NOT_EQUAL, "PERIOD_CLOSING"));
+ mainAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, lastClosedDate));
+ mainAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN, fromDate));
+ transactionTotals = delegator.findList("AcctgTransEntrySums", EntityCondition.makeCondition(mainAndExprs, EntityOperator.AND), UtilMisc.toSet("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount"), UtilMisc.toList("glAccountId"), null, false);
+ transactionTotals.each { transactionTotal ->
+ UtilMisc.addToBigDecimalInMap(accountMap, "opening" + transactionTotal.debitCreditFlag, transactionTotal.amount);
+ }
}
UtilMisc.addToBigDecimalInMap(accountMap, unpostedTransactionTotal.debitCreditFlag, unpostedTransactionTotal.amount);
unpostedTransactionTotalsMap.put(unpostedTransactionTotal.glAccountId, accountMap);
@@ -179,9 +259,44 @@
allTransactionTotals.each { allTransactionTotal ->
Map accountMap = (Map)allTransactionTotalsMap.get(allTransactionTotal.glAccountId);
if (!accountMap) {
- accountMap = UtilMisc.makeMapWritable(allTransactionTotal);
- accountMap.put("D", BigDecimal.ZERO);
- accountMap.put("C", BigDecimal.ZERO);
+ GenericValue glAccount = delegator.findOne("GlAccount", UtilMisc.toMap("glAccountId", allTransactionTotal.glAccountId), true);
+ if (glAccount) {
+ boolean isDebitAccount = UtilAccounting.isDebitAccount(glAccount);
+ // Get the opening balances at the end of the last closed time period
+ if (UtilAccounting.isAssetAccount(glAccount) || UtilAccounting.isLiabilityAccount(glAccount) || UtilAccounting.isEquityAccount(glAccount)) {
+ if (lastClosedTimePeriod) {
+ List timePeriodAndExprs = FastList.newInstance();
+ timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.EQUALS, organizationPartyId));
+ timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, allTransactionTotal.glAccountId));
+ timePeriodAndExprs.add(EntityCondition.makeCondition("customTimePeriodId", EntityOperator.EQUALS, lastClosedTimePeriod.customTimePeriodId));
+ lastTimePeriodHistory = EntityUtil.getFirst(delegator.findList("GlAccountAndHistory", EntityCondition.makeCondition(timePeriodAndExprs, EntityOperator.AND), null, null, null, false));
+ if (lastTimePeriodHistory) {
+ accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "openingD", lastTimePeriodHistory.getBigDecimal("postedDebits"), "openingC", lastTimePeriodHistory.getBigDecimal("postedCredits"), "D", BigDecimal.ZERO, "C", BigDecimal.ZERO);
+ }
+ }
+ }
+ }
+ if (!accountMap) {
+ accountMap = UtilMisc.makeMapWritable(allTransactionTotal);
+ accountMap.put("openingD", BigDecimal.ZERO);
+ accountMap.put("openingC", BigDecimal.ZERO);
+ accountMap.put("D", BigDecimal.ZERO);
+ accountMap.put("C", BigDecimal.ZERO);
+ accountMap.put("balance", BigDecimal.ZERO);
+ }
+ //
+ List mainAndExprs = FastList.newInstance();
+ mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds));
+ mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N"));
+ mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, allTransactionTotal.glAccountId));
+ mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId));
+ mainAndExprs.add(EntityCondition.makeCondition("acctgTransTypeId", EntityOperator.NOT_EQUAL, "PERIOD_CLOSING"));
+ mainAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, lastClosedDate));
+ mainAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN, fromDate));
+ transactionTotals = delegator.findList("AcctgTransEntrySums", EntityCondition.makeCondition(mainAndExprs, EntityOperator.AND), UtilMisc.toSet("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount"), UtilMisc.toList("glAccountId"), null, false);
+ transactionTotals.each { transactionTotal ->
+ UtilMisc.addToBigDecimalInMap(accountMap, "opening" + transactionTotal.debitCreditFlag, transactionTotal.amount);
+ }
}
UtilMisc.addToBigDecimalInMap(accountMap, allTransactionTotal.debitCreditFlag, allTransactionTotal.amount);
allTransactionTotalsMap.put(allTransactionTotal.glAccountId, accountMap);
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=888489&r1=888488&r2=888489&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Tue Dec 8 17:14:18 2009
@@ -2383,15 +2383,6 @@
<response name="success" type="view" value="CommissionRun"/>
</request-map>
- <request-map uri="MonthlyTrialBalance">
- <security auth="true" https="true"/>
- <response name="success" type="view" value="MonthlyTrialBalance"/>
- </request-map>
- <request-map uri="MonthlyTrialBalance.pdf">
- <security auth="true" https="true"/>
- <response name="success" type="view" value="MonthlyTrialBalancePdf"/>
- </request-map>
-
<!--Add Tax Settings -->
<request-map uri="addtax">
<security auth="true" https="true"/>
@@ -2757,8 +2748,6 @@
<view-map name="GlAccountTrialBalance" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#GlAccountTrialBalance"/>
<view-map name="GlAccountTrialBalanceReportPdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#GlAccountTrialBalanceReportPdf" content-type="application/pdf" encoding="none"/>
<view-map name="CommissionRun" type="screen" page="component://accounting/widget/ap/InvoiceScreens.xml#CommissionRun"/>
- <view-map name="MonthlyTrialBalance" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#MonthlyTrialBalance"/>
- <view-map name="MonthlyTrialBalancePdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#MonthlyTrialBalancePdf" content-type="application/pdf"/>
<view-map name="EditGlAccountCategory" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditGlAccountCategory"/>
<view-map name="FindGlAccountCategory" type="screen" page="component://accounting/widget/GlSetupScreens.xml#FindGlAccountCategory"/>
<view-map name="EditGlAccountCategoryMember" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditGlAccountCategoryMember"/>
Modified: ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml?rev=888489&r1=888488&r2=888489&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml Tue Dec 8 17:14:18 2009
@@ -817,11 +817,6 @@
<parameter param-name="organizationPartyId"/>
</link>
</menu-item>
- <menu-item name="MonthlyTrialBalance" title="${uiLabelMap.AccountingMonthlyTrialBalance}">
- <link target="MonthlyTrialBalance">
- <parameter param-name="organizationPartyId"/>
- </link>
- </menu-item>
<menu-item name="InventoryValuation" title="${uiLabelMap.AccountingInventoryValuation}">
<link target="InventoryValuation">
<parameter param-name="organizationPartyId"/>
Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=888489&r1=888488&r2=888489&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Tue Dec 8 17:14:18 2009
@@ -79,7 +79,7 @@
<field name="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
- <form name="IncomeStatementParameters" type="single" header-row-style="header-row" default-table-style="basic-table">
+ <form name="TransactionSelectionForm" type="single" header-row-style="header-row" default-table-style="basic-table">
<field name="selectedMonth" title="${uiLabelMap.CommonMonth}">
<drop-down allow-empty="true">
<list-options list-name="monthList" key-name="value" description="${description}"/>
@@ -384,6 +384,10 @@
</form>
<form name="PostedTransactionTotalList" type="list" list-name="postedTransactionTotals"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+ <row-actions>
+ <set field="closingD" value="${openingD + D}" type="BigDecimal"/>
+ <set field="closingC" value="${openingC + C}" type="BigDecimal"/>
+ </row-actions>
<field name="accountCode">
<hyperlink target="FindAcctgTransEntries" description="${accountCode}">
<parameter param-name="glAccountId"/>
@@ -391,32 +395,18 @@
</hyperlink>
</field>
<field name="accountName" title-area-style="tableheadwide"><display description="${accountName}"/></field>
+ <field name="openingD" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
+ <field name="openingC" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
<field name="D" title="${uiLabelMap.AccountingDebitFlag}" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
<field name="C" title="${uiLabelMap.AccountingCreditFlag}" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
+ <field name="closingD" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
+ <field name="closingC" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
</form>
<form name="UnpostedTransactionTotalList" type="list" list-name="unpostedTransactionTotals"
- 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="D" title="${uiLabelMap.AccountingDebitFlag}" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
- <field name="C" title="${uiLabelMap.AccountingCreditFlag}" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar" extends="PostedTransactionTotalList">
</form>
<form name="PostedAndUnpostedTransactionTotalList" type="list" list-name="allTransactionTotals"
- 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="D" title="${uiLabelMap.AccountingDebitFlag}" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
- <field name="C" title="${uiLabelMap.AccountingCreditFlag}" widget-style="tabletextright"><display type="currency" currency="${currencyUomId}"/></field>
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar" extends="PostedTransactionTotalList">
</form>
<form name="IncomeStatementListCsv" type="list" list-name="glAccountIncomeList" view-size="99999">
@@ -497,71 +487,6 @@
</field>
<field name="submitButton" widget-style="buttontext" action=""><submit button-type="text-link"/></field>
</form>
- <form name="MonthlyTrialBalance" type="single" target="MonthlyTrialBalance" title="Find list of monthly transaction totals"
- header-row-style="header-row" default-table-style="basic-table">
-
- <field name="organizationPartyId"><hidden/></field>
- <field name="selectedMonth">
- <drop-down allow-empty="true">
- <list-options list-name="monthList" key-name="value" description="${description}"/>
- </drop-down>
- </field>
- <field name="posted">
- <drop-down>
- <option description="${uiLabelMap.CommonY}" key="Y"/>
- <option description="${uiLabelMap.CommonN}" key="N"/>
- <option description="${uiLabelMap.CommonAll}" key="All"/>
- </drop-down>
- </field>
- <field name="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field>
- </form>
- <form name="MonthlyPostedTransactionList" type="list" list-name="postedTransTotalList" paginate-target="MonthlyTrialBalance"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-
- <field name="isPosted" field-name="parameters.isPosted"><hidden/></field>
- <field name="accountCode" title="${uiLabelMap.FormFieldTitle_accountCode}" entry-name="glAccountId">
- <display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode}"/>
- </field>
- <field name="accountName" title="${uiLabelMap.FormFieldTitle_accountName}" entry-name="glAccountId">
- <display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountName}"/>
- </field>
- <field name="openingBalanceCredit">
- <display description="${openingBalanceCredit}" type="currency" currency="${currencyUomId}"/>
- </field>
- <field name="openingBalanceDebit">
- <display description="${openingBalanceDebit}" type="currency" currency="${currencyUomId}"/>
- </field>
- <field name="monthAmountCredit">
- <display description="${credit}" type="currency" currency="${currencyUomId}"/>
- </field>
- <field name="monthAmountDebit">
- <display description="${debit}" type="currency" currency="${currencyUomId}"/>
- </field>
- <field name="closingBalanceCredit">
- <display description="${openingBalanceCredit + credit}" type="currency" currency="${currencyUomId}"/>
- </field>
- <field name="closingBalanceDebit">
- <display description="${openingBalanceDebit + debit}" type="currency" currency="${currencyUomId}"/>
- </field>
- <field name="yearToDateBalanceCredit">
- <display description="${openingBalanceCredit + credit}" type="currency" currency="${currencyUomId}"/>
- </field>
- <field name="yearToDateBalanceDebit">
- <display description="${openingBalanceDebit + debit}" type="currency" currency="${currencyUomId}"/>
- </field>
- </form>
-
- <form name="MonthlyUnpostedTransactionList" type="list" list-name="unpostedTransTotalList" paginate-target="MonthlyTrialBalance"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
- extends="MonthlyPostedTransactionList" extends-resource="component://accounting/widget/ReportFinancialSummaryForms.xml">
- <field name="isPosted" field-name="parameters.isPosted"><hidden/></field>
- </form>
-
- <form name="MonthlyPostedUnpostedTransactionList" type="list" list-name="postedAndUnpostedTransTotalList" paginate-target="MonthlyTrialBalance"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
- extends="MonthlyPostedTransactionList" extends-resource="component://accounting/widget/ReportFinancialSummaryForms.xml">
- <field name="isPosted" field-name="parameters.isPosted"><hidden/></field>
- </form>
<form name="InventoryValuation" type="single" target="InventoryValuation" header-row-style="header-row" default-table-style="basic-table">
<field name="facilityId" position="1">
Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=888489&r1=888488&r2=888489&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Tue Dec 8 17:14:18 2009
@@ -713,13 +713,14 @@
<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>
@@ -855,7 +856,7 @@
<decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.AccountingIncomeStatement}">
- <include-form name="IncomeStatementParameters" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
+ <include-form name="TransactionSelectionForm" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.AccountingIncomeStatement}">
<link text="${uiLabelMap.AccountingExportAsCsv}" style="button" target="IncomeStatementListCsv.csv">
@@ -1260,146 +1261,6 @@
</widgets>
</section>
</screen>
- <screen name="MonthlyTrialBalance">
- <section>
- <actions>
- <set field="titleProperty" value="AccountingMonthlyTrialBalance"/>
- <set field="labelTitleProperty" value="AccountingMonthlyTrialBalance"/>
- <set field="tabButtonItem" value="OrganizationAccountingReports"/>
- <set field="tabButtonItem2" value="MonthlyTrialBalance"/>
- <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"/>
- <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.AccountingMonthlyTrialBalance}">
- <include-form name="MonthlyTrialBalance" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
- </screenlet>
- <section>
- <condition>
- <and>
- <not><if-empty field="parameters.selectedMonth"/></not>
- <not><if-empty field="parameters.posted"/></not>
- </and>
- </condition>
- <widgets>
- <link text="${uiLabelMap.AccountingExportAsPdf}" style="button" target="MonthlyTrialBalance.pdf">
- <parameter param-name="posted" from-field="parameters.posted"/>
- <parameter param-name="selectedMonth" from-field="parameters.selectedMonth"/>
- <parameter param-name="organizationPartyId" from-field="parameters.organizationPartyId"/>
- </link>
- <section>
- <condition>
- <or>
- <if-compare field="parameters.posted" operator="equals" value="Y"/>
- <if-compare field="parameters.posted" operator="equals" value="All"/>
- </or>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingPostedTransactionTotals}">
- <include-form name="MonthlyPostedTransactionList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
- </screenlet>
- </widgets>
- </section>
- <section>
- <condition>
- <or>
- <if-compare field="parameters.posted" operator="equals" value="N"/>
- <if-compare field="parameters.posted" operator="equals" value="All"/>
- </or>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingUnPostedTransactionTotals}">
- <include-form name="MonthlyUnpostedTransactionList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
- </screenlet>
- </widgets>
- </section>
- <section>
- <condition>
- <if-compare field="parameters.posted" operator="equals" value="All"/>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingPostedAndUnpostedTransactionTotals}">
- <include-form name="MonthlyPostedUnpostedTransactionList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
- </screenlet>
- </widgets>
- </section>
- </widgets>
- </section>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
- <screen name="MonthlyTrialBalancePdf">
- <section>
- <actions>
- <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
- <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
- <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"/>
- <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="SimpleDecorator" location="component://common/widget/CommonScreens.xml">
- <decorator-section name="body">
- <section>
- <widgets>
- <section>
- <condition>
- <or>
- <if-compare field="parameters.posted" operator="equals" value="Y"/>
- <if-compare field="parameters.posted" operator="equals" value="All"/>
- </or>
- </condition>
- <widgets>
- <container>
- <label text="${uiLabelMap.AccountingPostedTransactionTotals}"/>
- <include-form name="MonthlyPostedTransactionList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
- </container>
- </widgets>
- </section>
- <section>
- <condition>
- <or>
- <if-compare field="parameters.posted" operator="equals" value="N"/>
- <if-compare field="parameters.posted" operator="equals" value="All"/>
- </or>
- </condition>
- <widgets>
- <container>
- <label text="${uiLabelMap.AccountingUnPostedTransactionTotals}"/>
- <include-form name="MonthlyUnpostedTransactionList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
- </container>
- </widgets>
- </section>
- <section>
- <condition>
- <if-compare field="parameters.posted" operator="equals" value="All"/>
- </condition>
- <widgets>
- <container>
- <label text="${uiLabelMap.AccountingPostedAndUnpostedTransactionTotals}"/>
- <include-form name="MonthlyPostedUnpostedTransactionList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
- </container>
- </widgets>
- </section>
- </widgets>
- </section>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
<screen name="GlAccountBalanceByCostCenter">
<section>