Author: jacopoc
Date: Sat Nov 10 07:36:59 2007 New Revision: 593786 URL: http://svn.apache.org/viewvc?rev=593786&view=rev Log: Implemented simple report for Trial Balance. Part of issue OFBIZ-1396 Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml 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=593786&r1=593785&r2=593786&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Sat Nov 10 07:36:59 2007 @@ -1397,6 +1397,7 @@ <!-- ================ Financial Summary Report requests ================== --> <request-map uri="FinancialSummaryReportOptions"><security https="true" auth="true"/><response name="success" type="view" value="FinancialSummaryReportOptions"/></request-map> <request-map uri="SalesInvoiceByProductCategorySummary"><security https="true" auth="true"/><response name="success" type="view" value="SalesInvoiceByProductCategorySummary"/></request-map> + <request-map uri="TrialBalance"><security https="true" auth="true"/><response name="success" type="view" value="TrialBalance"/></request-map> <!-- end of request mappings --> <!-- View Mappings --> @@ -1569,6 +1570,7 @@ <!-- Financial Summary Reports --> <view-map name="FinancialSummaryReportOptions" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#FinancialSummaryReportOptions"/> <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"/> <!-- Assignment Mappings --> <view-map name="EditPartyFixedAssetAssignments" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#EditPartyFixedAssetAssignments"/> Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=593786&r1=593785&r2=593786&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Sat Nov 10 07:36:59 2007 @@ -67,5 +67,28 @@ <form name="FinancialAccountSummaryOptions" type="single" target="FinancialAccountSummary" extends="BaseSummaryOptions"> <field name="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + + <form name="TrialBalanceList" type="list" list-name="trialBalances"> + <row-actions> + <entity-one entity-name="GlAccount" value-name="glAccount"> + <field-map field-name="glAccountId"/> + </entity-one> + <set field="showDebit" value="${bsh:(postedBalance > 0 && org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount)) || (postedBalance < 0 && org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount))}" type="Boolean"/> + <set field="showCredit" value="${bsh:(postedBalance > 0 && org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount)) || (postedBalance < 0 && org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount))}" type="Boolean"/> + <set field="absolutePostedBalance" value="${bsh:(postedBalance > 0? postedBalance: (-1)*postedBalance)}" type="Double"/> + <set field="showTotals" value="${bsh:(isLastRow != null && isLastRow==true)}" type="Boolean"/> + <set field="debitTotal" from-field="parameters.debitTotal" type="Double"/> + <set field="creditTotal" from-field="parameters.creditTotal" type="Double"/> + <set field="parameters.debitTotal" value="${bsh:(showDebit? (debitTotal + absolutePostedBalance): (debitTotal))}" type="Double"/> + <set field="parameters.creditTotal" value="${bsh:(showCredit? (creditTotal + absolutePostedBalance): (creditTotal))}" type="Double"/> + </row-actions> + <field name="glAccountId" use-when="!showTotals"><display description="[${glAccount.accountCode}] ${glAccount.accountName}"/></field> + <field name="debit" entry-name="absolutePostedBalance" use-when="showDebit"><display type="currency" currency="${currencyUomId}"/></field> + <field name="debit" use-when="showCredit"><display/></field> + <field name="credit" entry-name="absolutePostedBalance" use-when="showCredit"><display type="currency" currency="${currencyUomId}"/></field> + <field name="credit" use-when="showDebit"><display/></field> + <field name="glAccountId" use-when="showTotals" widget-style="tableheadtext" widget-area-style="viewManyTR1"><display description="${uiLabelMap.CommonTotal}"/></field> + <field name="debit" entry-name="parameters.debitTotal" use-when="showTotals" widget-area-style="viewManyTR1"><display type="currency" currency="${currencyUomId}"/></field> + <field name="credit" entry-name="creditTotal" use-when="showTotals" widget-area-style="viewManyTR1"><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=593786&r1=593785&r2=593786&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Sat Nov 10 07:36:59 2007 @@ -192,4 +192,42 @@ </widgets> </section> </screen> + + <screen name="TrialBalance"> + <section> + <actions> + <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"/> + + <entity-condition entity-name="GlAccountOrganization" list-name="trialBalances" filter-by-date="true"> + <condition-list> + <condition-expr field-name="organizationPartyId" operator="equals" env-name="organizationPartyId"/> + <condition-expr field-name="postedBalance" operator="not-equals" env-name="null"/> + </condition-list> + <order-by field-name="glAccountId"/> + </entity-condition> + <set field="totalsRow.isLastRow" value="true" type="Boolean"/> + <set field="totalsRow.postedBalance" value="0" type="Double"/> + <set field="trialBalances[]" from-field="totalsRow" type="Object"/> + <set field="parameters.debitTotal" value="0" type="Double"/> + <set field="parameters.creditTotal" value="0" type="Double"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <container> + <label style="head2" text="${uiLabelMap.AccountingTrialBalance}"/> + </container> + <container> + <label style="head3" text="${uiLabelMap.CommonFor} ${organizationPartyId}"/> + </container> + <include-form name="TrialBalanceList" location="component://accounting/widget/ReportFinancialSummaryForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> |
Free forum by Nabble | Edit this page |