You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ap...@apache.org on 2009/08/13 14:09:00 UTC

svn commit: r803854 - in /ofbiz/trunk/applications/accounting: config/ script/org/ofbiz/accounting/ledger/ servicedef/ webapp/accounting/WEB-INF/actions/reports/ widget/

Author: apatel
Date: Thu Aug 13 12:08:59 2009
New Revision: 803854

URL: http://svn.apache.org/viewvc?rev=803854&view=rev
Log:
Enhancements to Income Statement. Patch from OFBIZ-2827. Thanks Sumit for the patch.

Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
    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/actions/reports/MonthlyTrialBalance.groovy
    ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
    ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=803854&r1=803853&r2=803854&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Thu Aug 13 12:08:59 2009
@@ -3111,6 +3111,10 @@
         <value xml:lang="th">Error: ความผิดพลาด! ในการสร้างใบเสร็จรายการสั่งซื้อสินค้าจากรายการสั่งซื้อ</value>
         <value xml:lang="zh">从定单创建定单明细账单时出错</value>
     </property>
+    <property key="AccountingExpences">
+        <value xml:lagn="en">Expences</value>
+        <value xml:lagn="hi_IN">व्यय</value>
+    </property>
     <property key="AccountingExpEndOfLifeIsEmpty">
         <value xml:lang="de">Das Feld erwartetes End of Life bei den Anlage-Daten ist leer.</value>
         <value xml:lang="en">Field expectedEndOfLife is empty in FixedAsset data.</value>
@@ -4484,6 +4488,10 @@
         <value xml:lang="th">ส่งค่าผิดถึงการสร้าง invoice servic</value>
         <value xml:lang="zh">传递给新建发票服务的数值非法</value>
     </property>
+    <property key="AccountingIncome">
+        <value xml:lagn="en">Income</value>
+        <value xml:lagn="hi_IN">आय</value>
+    </property>
     <property key="AccountingIncomeStatement">
         <value xml:lang="ar">تصربح الدخل</value>
         <value xml:lang="de">Ertragsrechnung</value>
@@ -13392,5 +13400,5 @@
     <property key="PageTitleBatchPayments">
         <value xml:lang="en">Batch Payments</value>
         <value xml:lang="hi_IN">भुगतान का बैच</value>
-    </property>    
+    </property>
 </resource>

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=803854&r1=803853&r2=803854&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 Thu Aug 13 12:08:59 2009
@@ -996,8 +996,9 @@
                 <calcop operator="get" field="totalOfCurrentFiscalPeriod"/>
             </calculate>
             <set field="glAccountTotalMap.totalOfCurrentFiscalPeriod" from-field="totalOfCurrentFiscalPeriod" type="BigDecimal"/>
-            <set field="glAccountTotalsList[]" from-field="glAccountTotalMap"/>
+            <set field="glAccountIncomeList[]" from-field="glAccountTotalMap"/>
         </iterate-map>
+        <set field="glAccountTotalsMap.income" from-field="glAccountIncomeList"/>
         <iterate-map map="glAccountTotalsExpenseMap" key="glAccountId" value="totalAmount">
             <clear-field field="glAccountTotalMap"/>
             <set field="glAccountTotalMap.glAccountId" from-field="glAccountId"/>
@@ -1012,11 +1013,11 @@
                 <calcop operator="get" field="totalOfCurrentFiscalPeriod"/>
             </calculate>
             <set field="glAccountTotalMap.totalOfCurrentFiscalPeriod" from-field="totalOfCurrentFiscalPeriod" type="BigDecimal"/>
-            <set field="glAccountTotalsList[]" from-field="glAccountTotalMap"/>
+            <set field="glAccountExpenseList[]" from-field="glAccountTotalMap"/>
         </iterate-map>
-
+        <set field="glAccountTotalsMap.expenses" from-field="glAccountExpenseList"/>
         <field-to-result field="totalNetIncome" result-name="totalNetIncome"/>
-        <field-to-result field="glAccountTotalsList" result-name="glAccountTotalsList"/>
+        <field-to-result field="glAccountTotalsMap" result-name="glAccountTotalsMap"/>
     </simple-method>
 
     <simple-method method-name="prepareBalanceSheet" short-description="Prepare data for the Balance Sheet">

Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=803854&r1=803853&r2=803854&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Thu Aug 13 12:08:59 2009
@@ -303,7 +303,7 @@
         <attribute name="thruDate" type="Timestamp" mode="IN" optional="false"/>
         <attribute name="glFiscalTypeId" type="String" mode="IN" optional="false"/>
         <attribute name="totalNetIncome" type="BigDecimal" mode="OUT" optional="false"/>
-        <attribute name="glAccountTotalsList" type="List" mode="OUT" optional="true"/>
+        <attribute name="glAccountTotalsMap" type="Map" mode="OUT" optional="true"/>
     </service>
     <service name="prepareBalanceSheet" engine="simple"
         location="component://accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="prepareBalanceSheet" auth="true">

Modified: 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/MonthlyTrialBalance.groovy?rev=803854&r1=803853&r2=803854&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/MonthlyTrialBalance.groovy Thu Aug 13 12:08:59 2009
@@ -65,8 +65,12 @@
   if (parameters.isIncomeStatement) {
       prepareIncomeStatement = dispatcher.runSync("prepareIncomeStatement",
               [fromDate : fromDate, thruDate : thruDate, organizationPartyId : organizationPartyId, glFiscalTypeId : parameters.glFiscalTypeId, userLogin : userLogin]);
-      context.glAccountTotalsList = prepareIncomeStatement.glAccountTotalsList;
-      context.totalNetIncome = prepareIncomeStatement.totalNetIncome;
+      glAccountTotalsMap = prepareIncomeStatement.glAccountTotalsMap;
+      if (glAccountTotalsMap) {
+          context.glAccountIncomeList = glAccountTotalsMap.income;
+          context.glAccountExpenseList = glAccountTotalsMap.expenses;
+          context.totalNetIncome = prepareIncomeStatement.totalNetIncome;
+      }
   }
 }
 

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=803854&r1=803853&r2=803854&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Thu Aug 13 12:08:59 2009
@@ -129,7 +129,26 @@
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit" tooltip="Please enter From and Thru date in fields above"><submit button-type="button"/></field>
     </form>
 
-    <form name="IncomeStatementList" type="list" list-name="glAccountTotalsList"
+    <form name="IncomeStatementList" type="list" list-name="glAccountIncomeList"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <row-actions>
+            <entity-one entity-name="GlAccount" value-field="glAccount">
+                <field-map field-name="glAccountId" from-field="glAccountId"/>
+            </entity-one>
+        </row-actions>
+        <field name="glAccountId" use-when="isPdf != true">
+            <hyperlink target="FindAcctgTransEntries" description="${glAccountId}">
+                <parameter param-name="glAccountId"/>
+                <parameter param-name="organizationPartyId"/>
+            </hyperlink>
+        </field>
+        <field name="glAccountId"  use-when="isPdf == true"><display description="${glAccountId}"/></field>
+        <field name="accountName"><display description="${glAccount.accountName}"/></field>
+        <field name="totalAmount"><display type="currency" currency="${currencyUomId}"/></field>
+        <field name="totalOfCurrentFiscalPeriod"><display type="currency" currency="${currencyUomId}"/></field>
+    </form>
+
+    <form name="ExpenseStatementList" type="list" list-name="glAccountExpenseList"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <row-actions>
             <entity-one entity-name="GlAccount" value-field="glAccount">
@@ -294,7 +313,18 @@
         <field name="debit"><display type="currency" currency="${currencyUomId}"/></field>
         <field name="credit"><display type="currency" currency="${currencyUomId}"/></field>
     </form>
-    <form name="IncomeStatementListCsv" type="list" list-name="glAccountTotalsList" view-size="99999">
+
+    <form name="IncomeStatementListCsv" type="list" list-name="glAccountIncomeList" view-size="99999">
+        <row-actions>
+            <entity-one entity-name="GlAccount" value-field="glAccount"/>
+        </row-actions>
+        <field name="glAccountId"><display description="${glAccountId}"/></field>
+        <field name="glAccountName"><display description="${glAccount.accountName}"/></field>
+        <field name="totalAmount"><display type="currency" currency="${currencyUomId}"/></field>
+        <field name="totalOfCurrentFiscalPeriod"><display type="currency" currency="${currencyUomId}"/></field>
+    </form>
+
+    <form name="ExpenseStatementListCsv" type="list" list-name="glAccountExpenseList" view-size="99999">
         <row-actions>
             <entity-one entity-name="GlAccount" value-field="glAccount"/>
         </row-actions>

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=803854&r1=803853&r2=803854&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Thu Aug 13 12:08:59 2009
@@ -373,12 +373,15 @@
                                             <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>
-                                            <label style="h3" text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/>
-                                        </container>
+                                        <container style="h3"><label text="${uiLabelMap.AccountingExpences}"/></container>
+                                        <include-form name="ExpenseStatementList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
                                     </container>
                                 </container>
+                                <container>
+                                    <label style="h3" text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/>
+                                </container>
                             </widgets>
                         </section>
                     </decorator-section>
@@ -692,10 +695,11 @@
             <widgets>
                 <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml">
                     <decorator-section name="body">
+                        <container style="h3"><label text="${uiLabelMap.AccountingIncome}"/></container>
                         <include-form name="IncomeStatementList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
-                        <container>
-                            <label style="h3" text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/>
-                        </container>
+                        <container style="h3"><label text="${uiLabelMap.AccountingExpences}"/></container>
+                        <include-form name="ExpenseStatementList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
+                        <container><label style="h3" text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/></container>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
@@ -710,10 +714,11 @@
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy"/>
             </actions>
             <widgets>
+                <container><label text="${uiLabelMap.AccountingIncome}"/></container>
                 <include-form name="IncomeStatementListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
-                <container>
-                    <label style="h3" text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/>
-                </container>
+                <container><label text="${uiLabelMap.AccountingExpences}"/></container>
+                <include-form name="ExpenseStatementListCsv" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/>
+                <container><label text="${uiLabelMap.AccountingNetIncome}: ${totalNetIncome}"/></container>
             </widgets>
         </section>
     </screen>