svn commit: r607206 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/ledger/ servicedef/ webapp/accounting/WEB-INF/ widget/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r607206 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/ledger/ servicedef/ webapp/accounting/WEB-INF/ widget/

jacopoc
Author: jacopoc
Date: Fri Dec 28 03:12:38 2007
New Revision: 607206

URL: http://svn.apache.org/viewvc?rev=607206&view=rev
Log:
First experimental version of the Balance Sheet report.
OFBIZ-1502

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/widget/Menus.xml
    ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
    ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=607206&r1=607205&r2=607206&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Fri Dec 28 03:12:38 2007
@@ -827,7 +827,7 @@
         <call-service service-name="updateCustomTimePeriod" in-map-name="updateCustomTimePeriodInMap"/>
     </simple-method>
 
-    <simple-method method-name="prepareIncomeStatement" short-description="Close a financial CustomTimePeriod">
+    <simple-method method-name="prepareIncomeStatement" short-description="Prepare data for the Income Statement">
         <entity-one entity-name="GlAccountClass" value-name="expenseGlAccountClass">
             <field-map field-name="glAccountClassId" value="EXPENSE"/>
         </entity-one>
@@ -936,6 +936,202 @@
         <field-to-result field-name="totalNetIncome" result-name="totalNetIncome"/>
         <field-to-result field-name="glAccountTotalsMap" result-name="glAccountTotalsMap"/>
         <field-to-result field-name="glAccountTotalsList" result-name="glAccountTotalsList"/>
+    </simple-method>
+
+    <simple-method method-name="prepareBalanceSheet" short-description="Prepare data for the Balance Sheet">
+        <entity-one entity-name="GlAccountClass" value-name="assetGlAccountClass">
+            <field-map field-name="glAccountClassId" value="ASSET"/>
+        </entity-one>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="assetAccountClassIds">
+            <field field-name="assetGlAccountClass" type="GenericValue"/>
+        </call-class-method>
+        <entity-one entity-name="GlAccountClass" value-name="liabilityGlAccountClass">
+            <field-map field-name="glAccountClassId" value="LIABILITY"/>
+        </entity-one>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="liabilityAccountClassIds">
+            <field field-name="liabilityGlAccountClass" type="GenericValue"/>
+        </call-class-method>
+        <entity-one entity-name="GlAccountClass" value-name="equityGlAccountClass">
+            <field-map field-name="glAccountClassId" value="EQUITY"/>
+        </entity-one>
+        <call-class-method class-name="org.ofbiz.accounting.util.UtilAccounting" method-name="getDescendantGlAccountClassIds" ret-field-name="equityAccountClassIds">
+            <field field-name="equityGlAccountClass" type="GenericValue"/>
+        </call-class-method>
+
+        <!-- retrieve the last closed date for the same type of time period -->
+        <set field="findLastClosedDateInMap.organizationPartyId" from-field="parameters.organizationPartyId"/>
+        <set field="findLastClosedDateInMap.findDate" from-field="parameters.thruDate"/>
+        <call-service service-name="findLastClosedDate" in-map-name="findLastClosedDateInMap">
+            <result-to-field result-name="lastClosedDate"/>
+            <result-to-field result-name="lastClosedTimePeriod"/>
+        </call-service>
+        <if-empty field-name="lastClosedDate">
+            <add-error><fail-message message="Unable to find a last closed date for time period for organization [${customTimePeriod.organizationPartyId}]"/></add-error>
+        </if-empty>
+        <check-errors/>
+
+        <if-not-empty field-name="lastClosedTimePeriod">
+            <entity-condition entity-name="GlAccountAndHistory" list-name="glAccountAndHistories">
+                <condition-list combine="and">
+                    <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
+                    <condition-expr field-name="customTimePeriodId" operator="equals" env-name="lastClosedTimePeriod.customTimePeriodId"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" env-name="assetAccountClassIds"/>
+                </condition-list>
+                <order-by field-name="glAccountId"/>
+            </entity-condition>
+            <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
+                <set field="glAccountTotalsAssetMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance" type="Double"/>
+            </iterate>
+            <entity-condition entity-name="GlAccountAndHistory" list-name="glAccountAndHistories">
+                <condition-list combine="and">
+                    <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
+                    <condition-expr field-name="customTimePeriodId" operator="equals" env-name="lastClosedTimePeriod.customTimePeriodId"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" env-name="liabilityAccountClassIds"/>
+                </condition-list>
+                <order-by field-name="glAccountId"/>
+            </entity-condition>
+            <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
+                <set field="glAccountTotalsLiabilityMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance" type="Double"/>
+            </iterate>
+            <entity-condition entity-name="GlAccountAndHistory" list-name="glAccountAndHistories">
+                <condition-list combine="and">
+                    <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
+                    <condition-expr field-name="customTimePeriodId" operator="equals" env-name="lastClosedTimePeriod.customTimePeriodId"/>
+                    <condition-expr field-name="glAccountClassId" operator="in" env-name="equityAccountClassIds"/>
+                </condition-list>
+                <order-by field-name="glAccountId"/>
+            </entity-condition>
+            <iterate list-name="glAccountAndHistories" entry-name="glAccountAndHistory">
+                <set field="glAccountTotalsEquityMap.${glAccountAndHistory.glAccountId}" from-field="glAccountAndHistory.endingBalance" type="Double"/>
+            </iterate>
+        </if-not-empty>
+
+        <entity-condition entity-name="AcctgTransAndEntries" list-name="acctgTransAndEntries">
+            <condition-list combine="and">
+                <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
+                <condition-expr field-name="isPosted" operator="equals" value="Y"/>
+                <condition-expr field-name="glFiscalTypeId" operator="equals" env-name="parameters.glFiscalTypeId"/>
+                <condition-expr field-name="transactionDate" operator="greater-equals" env-name="lastClosedDate"/>
+                <condition-expr field-name="transactionDate" operator="less" env-name="parameters.thruDate"/> <!-- FIXME: Date to Timestamp -->
+                <condition-expr field-name="acctgTransTypeId" operator="not-equals" value="PERIOD_CLOSING"/>
+                <condition-expr field-name="glAccountClassId" operator="in" env-name="assetAccountClassIds"/>
+            </condition-list>
+            <order-by field-name="acctgTransId"/>
+            <order-by field-name="acctgTransEntrySeqId"/>
+        </entity-condition>
+        <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
+            <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+            <if-compare field-name="acctgTransAndEntry.debitCreditFlag" operator="equals" value="C">
+                <calculate field-name="amount">
+                    <calcop field-name="amount" operator="negative"/>
+                </calculate>
+            </if-compare>
+            <if-empty field-name="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}">
+                <set field="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="Double"/>
+            </if-empty>
+            <calculate field-name="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}" type="Double">
+                <calcop field-name="glAccountTotalsAssetMap.${acctgTransAndEntry.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
+            </calculate>
+        </iterate>
+        <entity-condition entity-name="AcctgTransAndEntries" list-name="acctgTransAndEntries">
+            <condition-list combine="and">
+                <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
+                <condition-expr field-name="isPosted" operator="equals" value="Y"/>
+                <condition-expr field-name="glFiscalTypeId" operator="equals" env-name="parameters.glFiscalTypeId"/>
+                <condition-expr field-name="transactionDate" operator="greater-equals" env-name="lastClosedDate"/>
+                <condition-expr field-name="transactionDate" operator="less" env-name="parameters.thruDate"/> <!-- FIXME: Date to Timestamp -->
+                <condition-expr field-name="acctgTransTypeId" operator="not-equals" value="PERIOD_CLOSING"/>
+                <condition-expr field-name="glAccountClassId" operator="in" env-name="liabilityAccountClassIds"/>
+            </condition-list>
+            <order-by field-name="acctgTransId"/>
+            <order-by field-name="acctgTransEntrySeqId"/>
+        </entity-condition>
+        <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
+            <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+            <if-compare field-name="acctgTransAndEntry.debitCreditFlag" operator="equals" value="D">
+                <calculate field-name="amount">
+                    <calcop field-name="amount" operator="negative"/>
+                </calculate>
+            </if-compare>
+            <if-empty field-name="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}">
+                <set field="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="Double"/>
+            </if-empty>
+            <calculate field-name="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}" type="Double">
+                <calcop field-name="glAccountTotalsLiabilityMap.${acctgTransAndEntry.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
+            </calculate>
+        </iterate>
+        <entity-condition entity-name="AcctgTransAndEntries" list-name="acctgTransAndEntries">
+            <condition-list combine="and">
+                <condition-expr field-name="organizationPartyId" operator="equals" env-name="parameters.organizationPartyId"/>
+                <condition-expr field-name="isPosted" operator="equals" value="Y"/>
+                <condition-expr field-name="glFiscalTypeId" operator="equals" env-name="parameters.glFiscalTypeId"/>
+                <condition-expr field-name="transactionDate" operator="greater-equals" env-name="lastClosedDate"/>
+                <condition-expr field-name="transactionDate" operator="less" env-name="parameters.thruDate"/> <!-- FIXME: Date to Timestamp -->
+                <condition-expr field-name="acctgTransTypeId" operator="not-equals" value="PERIOD_CLOSING"/>
+                <condition-expr field-name="glAccountClassId" operator="in" env-name="equityAccountClassIds"/>
+            </condition-list>
+            <order-by field-name="acctgTransId"/>
+            <order-by field-name="acctgTransEntrySeqId"/>
+        </entity-condition>
+        <iterate list-name="acctgTransAndEntries" entry-name="acctgTransAndEntry">
+            <set field="amount" from-field="acctgTransAndEntry.amount" type="Double"/>
+            <if-compare field-name="acctgTransAndEntry.debitCreditFlag" operator="equals" value="D">
+                <calculate field-name="amount">
+                    <calcop field-name="amount" operator="negative"/>
+                </calculate>
+            </if-compare>
+            <if-empty field-name="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}">
+                <set field="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}" value="0.0" type="Double"/>
+            </if-empty>
+            <calculate field-name="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}" type="Double">
+                <calcop field-name="glAccountTotalsEquityMap.${acctgTransAndEntry.glAccountId}" operator="add"><calcop field-name="amount" operator="get"/></calcop>
+            </calculate>
+        </iterate>
+
+        <!-- retrieve the last closed date for the same type of time period -->
+        <set field="prepareIncomeStatementInMap.organizationPartyId" from-field="parameters.organizationPartyId"/>
+        <set field="prepareIncomeStatementInMap.glFiscalTypeId" from-field="parameters.glFiscalTypeId"/>
+        <set field="prepareIncomeStatementInMap.fromDate" from-field="lastClosedDate"/>
+        <set field="prepareIncomeStatementInMap.thruDate" from-field="parameters.thruDate"/>
+        <call-service service-name="prepareIncomeStatement" in-map-name="prepareIncomeStatementInMap">
+            <result-to-field result-name="totalNetIncome"/>
+        </call-service>
+        <!-- get the retained earnings account -->
+        <entity-one entity-name="GlAccountTypeDefault" value-name="retainedEarningsAccount" use-cache="true">
+            <field-map field-name="organizationPartyId" env-name="parameters.organizationPartyId"/>
+            <field-map field-name="glAccountTypeId" value="RETAINED_EARNINGS"/>
+        </entity-one>
+        <if-not-empty field-name="retainedEarningsAccount">
+            <if-empty field-name="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}">
+                <set field="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}" value="0.0" type="Double"/>
+            </if-empty>
+            <calculate field-name="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}" type="Double">
+                <calcop field-name="glAccountTotalsEquityMap.${retainedEarningsAccount.glAccountId}" operator="add"><calcop field-name="totalNetIncome" operator="get"/></calcop>
+            </calculate>
+        </if-not-empty>
+
+        <iterate-map map-name="glAccountTotalsAssetMap" key-name="glAccountId" value-name="totalAmount">
+            <clear-field field-name="glAccountTotalMap"/>
+            <set field="glAccountTotalMap.glAccountId" from-field="glAccountId"/>
+            <set field="glAccountTotalMap.totalAmount" from-field="totalAmount"/>
+            <set field="assetBalancesList[]" from-field="glAccountTotalMap"/>
+        </iterate-map>
+        <iterate-map map-name="glAccountTotalsLiabilityMap" key-name="glAccountId" value-name="totalAmount">
+            <clear-field field-name="glAccountTotalMap"/>
+            <set field="glAccountTotalMap.glAccountId" from-field="glAccountId"/>
+            <set field="glAccountTotalMap.totalAmount" from-field="totalAmount"/>
+            <set field="liabilityBalancesList[]" from-field="glAccountTotalMap"/>
+        </iterate-map>
+        <iterate-map map-name="glAccountTotalsEquityMap" key-name="glAccountId" value-name="totalAmount">
+            <clear-field field-name="glAccountTotalMap"/>
+            <set field="glAccountTotalMap.glAccountId" from-field="glAccountId"/>
+            <set field="glAccountTotalMap.totalAmount" from-field="totalAmount"/>
+            <set field="equityBalancesList[]" from-field="glAccountTotalMap"/>
+        </iterate-map>
+
+        <field-to-result field-name="assetBalancesList" result-name="equityBalancesList"/>
+        <field-to-result field-name="liabilityBalancesList" result-name="equityBalancesList"/>
+        <field-to-result field-name="equityBalancesList" result-name="equityBalancesList"/>
     </simple-method>
 
     <!-- Services for the automatic creation of accounting transactions based on business transactions

Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=607206&r1=607205&r2=607206&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Fri Dec 28 03:12:38 2007
@@ -287,9 +287,10 @@
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
+    <!-- Financial Reports -->
     <service name="prepareIncomeStatement" engine="simple"
         location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="prepareIncomeStatement" auth="true">
-        <description>Prepare the data for the income statement</description>
+        <description>Prepare the data for the Income Statement</description>
         <attribute name="organizationPartyId" type="String" mode="IN" optional="false"/>
         <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
         <attribute name="thruDate" type="Timestamp" mode="IN" optional="false"/>
@@ -297,6 +298,16 @@
         <attribute name="totalNetIncome" type="Double" mode="OUT" optional="false"/>
         <attribute name="glAccountTotalsMap" type="Map" mode="OUT" optional="true"/>
         <attribute name="glAccountTotalsList" type="List" mode="OUT" optional="true"/>
+    </service>
+    <service name="prepareBalanceSheet" engine="simple"
+        location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="prepareBalanceSheet" auth="true">
+        <description>Prepare the data for the Balance Sheet</description>
+        <attribute name="organizationPartyId" type="String" mode="IN" optional="false"/>
+        <attribute name="thruDate" type="Timestamp" mode="IN" optional="false"/>
+        <attribute name="glFiscalTypeId" type="String" mode="IN" optional="false"/>
+        <attribute name="assetBalancesList" type="List" mode="OUT" optional="true"/>
+        <attribute name="liabilityBalancesList" type="List" mode="OUT" optional="true"/>
+        <attribute name="equityBalancesList" type="List" mode="OUT" optional="true"/>
     </service>
 
     <!-- Miscellaneous Ledger-related services -->

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=607206&r1=607205&r2=607206&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Fri Dec 28 03:12:38 2007
@@ -1720,6 +1720,13 @@
         <response name="success" type="view" value="IncomeStatement"/>
         <response name="error" type="view" value="IncomeStatement"/>        
     </request-map>
+    <request-map uri="BalanceSheet"><security https="true" auth="true"/><response name="success" type="view" value="BalanceSheet"/></request-map>
+    <request-map uri="prepareBalanceSheet">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="prepareBalanceSheet"/>
+        <response name="success" type="view" value="BalanceSheet"/>
+        <response name="error" type="view" value="BalanceSheet"/>        
+    </request-map>
     <request-map uri="TransactionTotals"><security https="true" auth="true"/><response name="success" type="view" value="TransactionTotals"/></request-map>
     <!-- end of request mappings -->
 
@@ -1910,6 +1917,7 @@
     <view-map name="SalesInvoiceByProductCategorySummary" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#SalesInvoiceByProductCategorySummary"/>
     <view-map name="TrialBalance" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#TrialBalance"/>
     <view-map name="IncomeStatement" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#IncomeStatement"/>
+    <view-map name="BalanceSheet" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#BalanceSheet"/>
     <view-map name="TransactionTotals" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#TransactionTotals"/>
     
     <!-- Assignment Mappings -->

Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=607206&r1=607205&r2=607206&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Fri Dec 28 03:12:38 2007
@@ -451,6 +451,9 @@
         <menu-item name="IncomeStatement" title="${uiLabelMap.AccountingIncomeStatement}">
             <link target="IncomeStatement?organizationPartyId=${organizationPartyId}"/>
         </menu-item>
+        <menu-item name="BalanceSheet" title="${uiLabelMap.AccountingBalanceSheet}">
+            <link target="BalanceSheet?organizationPartyId=${organizationPartyId}"/>
+        </menu-item>
         <menu-item name="TransactionTotals" title="${uiLabelMap.AccountingTransactionTotals}">
             <link target="TransactionTotals?organizationPartyId=${organizationPartyId}"/>
         </menu-item>

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=607206&r1=607205&r2=607206&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Fri Dec 28 03:12:38 2007
@@ -119,4 +119,52 @@
         </field>
         <field name="totalAmount"><display type="currency" currency="${currencyUomId}"/></field>
     </form>
+
+    <form name="BalanceSheetParameters" type="single" target="prepareBalanceSheet">
+        <field name="organizationPartyId"><hidden/></field>
+        <field name="thruDate"><date-time/></field>
+        <field name="glFiscalTypeId">
+            <drop-down>
+                <entity-options entity-name="GlFiscalType" description="${description}">
+                    <entity-order-by field-name="glFiscalTypeId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+
+    <form name="BalanceSheetAssetList" type="list" list-name="assetBalancesList">
+        <row-actions>
+            <entity-one entity-name="GlAccount" value-name="glAccount">
+                <field-map field-name="glAccountId"/>
+            </entity-one>
+        </row-actions>
+        <field name="glAccountId">
+            <hyperlink target="FindAcctgTransEntries?glAccountId=${glAccountId}&amp;organizationPartyId=${organizationPartyId}" description="[${glAccountId}] [${glAccount.accountCode}] ${glAccount.accountName}"/>
+        </field>
+        <field name="totalAmount"><display type="currency" currency="${currencyUomId}"/></field>
+    </form>
+    <form name="BalanceSheetLiabilityList" type="list" list-name="liabilityBalancesList">
+        <row-actions>
+            <entity-one entity-name="GlAccount" value-name="glAccount">
+                <field-map field-name="glAccountId"/>
+            </entity-one>
+        </row-actions>
+        <field name="glAccountId">
+            <hyperlink target="FindAcctgTransEntries?glAccountId=${glAccountId}&amp;organizationPartyId=${organizationPartyId}" description="[${glAccountId}] [${glAccount.accountCode}] ${glAccount.accountName}"/>
+        </field>
+        <field name="totalAmount"><display type="currency" currency="${currencyUomId}"/></field>
+    </form>
+    <form name="BalanceSheetEquityList" type="list" list-name="equityBalancesList">
+        <row-actions>
+            <entity-one entity-name="GlAccount" value-name="glAccount">
+                <field-map field-name="glAccountId"/>
+            </entity-one>
+        </row-actions>
+        <field name="glAccountId">
+            <hyperlink target="FindAcctgTransEntries?glAccountId=${glAccountId}&amp;organizationPartyId=${organizationPartyId}" description="[${glAccountId}] [${glAccount.accountCode}] ${glAccount.accountName}"/>
+        </field>
+        <field name="totalAmount"><display type="currency" currency="${currencyUomId}"/></field>
+    </form>
+
 </forms>

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=607206&r1=607205&r2=607206&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Fri Dec 28 03:12:38 2007
@@ -267,6 +267,57 @@
         </section>
     </screen>
 
+    <screen name="BalanceSheet">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="OrganizationAccountingReports"/>
+                <set field="tabButtonItem2" value="BalanceSheet"/>
+                <set field="organizationPartyId" from-field="parameters.organizationPartyId"/>
+                <set field="organizationPartyId" from-field="parameters.organizationPartyId"/>
+                <entity-one entity-name="PartyAcctgPreference" value-name="partyAcctgPreference" auto-field-map="false">
+                    <field-map field-name="partyId" env-name="organizationPartyId"/>
+                </entity-one>
+                <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"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonOrganizationAccountingReportsDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container>
+                            <label style="head2" text="${uiLabelMap.AccountingBalanceSheet}"/>
+                        </container>
+                        <include-form name="BalanceSheetParameters" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
+                        <section>
+                            <condition>
+                                <or>
+                                    <not><if-empty field-name="assetBalancesList"/></not>
+                                    <not><if-empty field-name="liabilityBalancesList"/></not>
+                                    <not><if-empty field-name="equityBalancesList"/></not>
+                                </or>
+                            </condition>
+                            <widgets>
+                                <container>
+                                    <label style="head2" text="${uiLabelMap.AccountingAssets}"/>
+                                </container>
+                                <include-form name="BalanceSheetAssetList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
+                                <container>
+                                    <label style="head2" text="${uiLabelMap.AccountingLiabilities}"/>
+                                </container>
+                                <include-form name="BalanceSheetLiabilityList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
+                                <container>
+                                    <label style="head2" text="${uiLabelMap.AccountingEquities}"/>
+                                </container>
+                                <include-form name="BalanceSheetEquityList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
     <!-- TODO: this is just a placeholder: the report is not still implemented -->
     <screen name="TransactionTotals">
         <section>