You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2007/12/25 07:20:13 UTC

svn commit: r606760 - in /ofbiz/trunk/applications/accounting: config/ webapp/accounting/WEB-INF/ webapp/accounting/chartofaccounts/ webapp/accounting/includes/ widget/

Author: ashish
Date: Mon Dec 24 22:20:11 2007
New Revision: 606760

URL: http://svn.apache.org/viewvc?rev=606760&view=rev
Log:
Applied patch from JIRA Issue # OFBIZ-1529.
Description :- UI: Create a new top level menu item in the accounting component: "Global GL Settings"(Submenu will be Chart Of Accounts,Costs,Payment Method Type and Invoice Item Type) .I think this changes are useful from the user point of view.


Thanks to Jyotsna Rathore for working on this.
Special thanks to Pranay Pandey for improving this patch.

Added:
    ofbiz/trunk/applications/accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl   (with props)
Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl
    ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
    ofbiz/trunk/applications/accounting/widget/CostScreens.xml
    ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml
    ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml
    ofbiz/trunk/applications/accounting/widget/Menus.xml
    ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties?rev=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Mon Dec 24 22:20:11 2007
@@ -230,6 +230,7 @@
 AccountingGlAccountDefault=GL Account defaults
 AccountingGlAccountId=GL Account ID
 AccountingGlAccountTypeDefaults=GL Account Type Defaults
+AccountingGlobalGLSettings=Global GL Settings
 AccountingGlJournals=Journals
 AccountingInvoiceHeaderDetailedInformation=Header Detailed Information
 AccountingHideFields=Hide Fields

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=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Mon Dec 24 22:20:11 2007
@@ -1676,6 +1676,12 @@
         <response name="success" type="view" value="PrintCheckPDF"/>
     </request-map>
     
+    <!--Global GL Settings -->
+    <request-map uri="globalGLSettings">
+        <security auth="true" https="true"/>
+        <response type="view" name="success" value="FindGlobalGlAccount"/>
+    </request-map>
+    
     <!-- ================ 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>

Added: ofbiz/trunk/applications/accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl?rev=606760&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl (added)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl Mon Dec 24 22:20:11 2007
@@ -0,0 +1,27 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#assign selected = page.tabButtonItem2?default("void")>
+<div class="button-bar button-style-1">
+  <ul>
+    <li<#if selected == "GlAccountNavigate"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AcctgNavigateAccts}</a></li>
+    <li<#if selected == "AssignGlAccount"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AcctgAssignGlAccount}</a></li>
+  </ul>
+  <br class="clear"/>
+</div>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl?rev=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl Mon Dec 24 22:20:11 2007
@@ -33,11 +33,8 @@
     <li<#if selected == "TaxAuthorities"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingTaxAuthorities}</a></li>
     <li<#if selected == "agreement"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingAgreements}</a></li>
     <li<#if selected == "ListFixedAssets"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingFixedAssets}</a></li>
-    <li<#if selected == "chartofaccounts"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingChartOfAcctsMenu}</a></li>
     <li<#if selected == "companies"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingGeneralLedger}</a></li>
-    <li<#if selected == "costs"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingCostCalcs}</a></li>
-    <li<#if selected == "PaymentMethodTypes"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingPaymentMethodType}</a></li>
-    <li<#if selected == "InvoiceItemTypes"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingInvoiceItemType}</a></li>
+    <li<#if selected == "GlobalGLSettings"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingGlobalGLSettings}</a></li>    
     <#if userLogin?has_content>
       <li class="opposed"><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
     <#else>

Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?rev=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Mon Dec 24 22:20:11 2007
@@ -319,5 +319,27 @@
             </widgets>
         </section>
     </screen>
-
+    
+    <screen name="GlobalGLSettingsDecorator">
+        <section>
+            <actions>
+                <set field="headerItem" value="GlobalGLSettings"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <container>
+                                    <include-menu name="GlobalGLSettingMenus" location="component://accounting/widget/Menus.xml"/>
+                                </container>
+                            </widgets>
+                        </section>
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>    
+            </widgets>
+        </section>
+    </screen>
+    
 </screens>

Modified: ofbiz/trunk/applications/accounting/widget/CostScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CostScreens.xml?rev=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CostScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CostScreens.xml Mon Dec 24 22:20:11 2007
@@ -26,8 +26,8 @@
                 <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD" />
                 
                 <set field="title" value="Edit cost component calc information"/>
+                <set field="tabButtonItem" value="Costs"/>
                 <set field="titleProperty" value="PageTitleEditCostCalcs"/>
-                <set field="headerItem" value="costs"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="50"/>
 
@@ -35,7 +35,7 @@
                 <entity-one entity-name="CostComponentCalc" value-name="costComponentCalc"/>
             </actions>
             <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container>
                             <label style="head1">${uiLabelMap.ManufacturingManageCostComponentCalc}</label>

Modified: ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml?rev=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml Mon Dec 24 22:20:11 2007
@@ -99,16 +99,25 @@
         <section>
             <actions>
                 <set field="titleProperty" value="AcctgAssignGlAccount"/>
-                <!-- <set field="titleProperty" value=""/> -->
-                <set field="tabButtonItem" value="AssignGlAccount"/>
-                <set field="headerItem" value="chartofaccounts"/>
+                <set field="tabButtonItem" value="Chartofaccounts"/>
+                <set field="tabButtonItem2" value="AssignGlAccount"/>
                 <set field="labelTitleProperty" value="AcctgAssignGlAccount"/>
     
                 <!-- <set field="accountId" from-field="parameters.accountId"/> -->
             </actions>
             <widgets>
-                <decorator-screen name="GenericDecorator">
+                <decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <platform-specific>
+                                    <html><html-template location="component://accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl"/></html>
+                                </platform-specific>
+                                <container>
+                                    <label style="head1">${uiLabelMap.${labelTitleProperty}}</label>
+                                </container>
+                            </widgets>
+                        </section>                        
                         <include-form name="AssignGlAccount" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
@@ -120,9 +129,9 @@
         <section>
             <actions>
                 <set field="titleProperty" value="AcctgNavigateAccts"/>
-                <!-- <set field="titleProperty" value=""/> -->
-                <set field="tabButtonItem" value="GlAccountNavigate"/>
-                <set field="headerItem" value="chartofaccounts"/>
+                <set field="headerItem" value="GlobalGLSettings"/>
+                <set field="tabButtonItem" value="Chartofaccounts"/>
+                <set field="tabButtonItem2" value="GlAccountNavigate"/>
                 <set field="labelTitleProperty" value="AcctgNavigateAccts"/>
                 <!-- parameters includes requestAttributes and parameter map -->
                 <!-- requestParameters is just the parameter map -->
@@ -134,8 +143,15 @@
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <container>
+                                    <include-menu name="GlobalGLSettingMenus" location="component://accounting/widget/Menus.xml"/>
+                                </container>
+                            </widgets>
+                        </section>
                         <platform-specific>
-                            <html><html-template location="component://accounting/webapp/accounting/chartofaccounts/GlAccountTabBar.ftl"/></html>
+                            <html><html-template location="component://accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl"/></html>
                         </platform-specific>
                         <container style="column-left-wide">
                             <include-tree name="GlAccountTree" location="component://accounting/widget/AccountingTrees.xml" /> 
@@ -225,8 +241,8 @@
         <section>
             <actions>                
                 <set field="titleProperty" value="PageTitleListAccounts"/>
-                <set field="tabButtonItem" value="FindGlobalGlAccount"/>
                 <set field="labelTitleProperty" value="PageTitleListAccounts"/>
+                <set field="tabButtonItem" value="Chartofaccounts"/>
                 <!-- no longer works requies a fieldMap entity-and entity-name="GlAccount" list-name="entityList" use-cache="true" >
                     <limit-range start="0" size="20" />
                 </entity-and -->
@@ -234,8 +250,14 @@
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="50"/>
             </actions>
             <widgets>
-                <decorator-screen name="GenericDecorator">
+                <decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
+                       <platform-specific>
+                            <html><html-template location="component://accounting/webapp/accounting/chartofaccounts/GlSettingTabBar.ftl"/></html>
+                       </platform-specific>
+                                <container>
+                                    <label style="head1">${uiLabelMap.${labelTitleProperty}}</label>
+                                </container>
                         <container style="button-bar">
                             <link target="ListGlAccountsReport" text="${uiLabelMap.CommonPrint}" style="buttontext"/>
                             <link target="ListGlAccountsExport" text="${uiLabelMap.CommonExport}" style="buttontext"/>

Modified: ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml?rev=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceItemTypeScreens.xml Mon Dec 24 22:20:11 2007
@@ -25,7 +25,7 @@
         <section>
             <actions>
                 <set field="titleProperty" value="PageTitleInvoiceItemType"/>
-                <set field="headerItem" value="InvoiceItemTypes"/>
+                <set field="tabButtonItem" value="InvoiceItemTypes"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/>
                 <entity-condition entity-name="InvoiceItemType" list-name="invoiceItemTypes">
@@ -33,7 +33,7 @@
                 </entity-condition>    
             </actions>
             <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container><label style="head1">${uiLabelMap.AccountingListInvoiceItemType}</label></container>
                         <include-form name="ListInvoiceItemType" location="component://accounting/widget/InvoiceItemTypeForms.xml"/>

Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Mon Dec 24 22:20:11 2007
@@ -515,5 +515,20 @@
             <link target="listChecksToSend?organizationPartyId=${organizationPartyId}"/>
         </menu-item>
     </menu>
+    
+    <menu name="GlobalGLSettingMenus" selected-menuitem-context-field-name="tabButtonItem" default-menu-item-name="chartofaccounts" default-selected-style="tabButtonSelected">
+        <menu-item name="Chartofaccounts" title="${uiLabelMap.AccountingChartOfAcctsMenu}">
+            <link target="FindGlobalGlAccount"/>
+        </menu-item>        
+        <menu-item name="Costs" title="${uiLabelMap.ManufacturingCostCalcs}">
+            <link target="EditCostCalcs"/>
+        </menu-item>  
+        <menu-item name="PaymentMethodTypes" title="${uiLabelMap.AccountingPaymentMethodType}">
+            <link target="editPaymentMethodType"/>
+        </menu-item> 
+        <menu-item name="InvoiceItemTypes" title="${uiLabelMap.AccountingInvoiceItemType}">
+            <link target="editInvoiceItemType"/>
+        </menu-item>    
+    </menu>
 </menus>
     

Modified: ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml?rev=606760&r1=606759&r2=606760&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/PaymentMethodTypeScreens.xml Mon Dec 24 22:20:11 2007
@@ -24,16 +24,16 @@
     <screen name="EditPaymentMethodType">
         <section>
             <actions>
+                <set field="tabButtonItem" value="PaymentMethodTypes"/>
                 <set field="titleProperty" value="AccountingPaymentMethodType"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/>
-                <set field="headerItem" value="PaymentMethodTypes"/>
                 <entity-condition entity-name="PaymentMethodType" list-name="paymentMethodTypes">
                     <order-by field-name="paymentMethodTypeId"/>
                 </entity-condition>   
             </actions>
             <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container style="head1"><label text="${uiLabelMap.AccountingListPaymentMethodType}"/></container>
                         <include-form name="ListPaymentMethodType" location="component://accounting/widget/PaymentMethodTypeForms.xml"/>