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 2007/11/23 15:31:16 UTC
svn commit: r597673 - in /ofbiz/trunk/applications/accounting: config/
script/org/ofbiz/accounting/admin/ servicedef/ webapp/accounting/WEB-INF/
webapp/accounting/admin/ webapp/accounting/includes/ widget/
Author: jacopoc
Date: Fri Nov 23 06:31:15 2007
New Revision: 597673
URL: http://svn.apache.org/viewvc?rev=597673&view=rev
Log:
Implemented new screen and services to manage the organization's GlAccountDefaults information.
Changed sorting of the top menu items.
Modified:
ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
ofbiz/trunk/applications/accounting/servicedef/services_admin.xml
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml
ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl
ofbiz/trunk/applications/accounting/widget/AdminScreens.xml
ofbiz/trunk/applications/accounting/widget/Menus.xml
Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties?rev=597673&r1=597672&r2=597673&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Fri Nov 23 06:31:15 2007
@@ -216,6 +216,7 @@
AccountingGlAccountClass=GL Account Class
AccountingGlAccountDefault=GL Account defaults
AccountingGlAccountId=GL Account ID
+AccountingGlAccountTypeDefaults=GL Account Type Defaults
AccountingInvoiceHeaderDetailedInformation=Header Detailed Information
AccountingHideFields=Hide Fields
AccountingIgnoreInvoiceItems=Ignore Invoice Items
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml?rev=597673&r1=597672&r2=597673&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml Fri Nov 23 06:31:15 2007
@@ -78,6 +78,17 @@
<call-service service-name="createUomConversionDated" in-map-name="createParams"/>
</simple-method>
+ <simple-method method-name="createGlAccountTypeDefault" short-description="Define a default GL account for an Account Type for a certain organisation party.">
+ <make-value entity-name="GlAccountTypeDefault" value-name="newEntity"/>
+ <set-pk-fields map-name="parameters" value-name="newEntity"/>
+ <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+ <create-value value-name="newEntity"/>
+ </simple-method>
+ <simple-method method-name="removeGlAccountTypeDefault" short-description="Remove a default GL account for an Account Type for a certain organisation party.">
+ <entity-one entity-name="GlAccountTypeDefault" value-name="glAccountTypeDefault"/>
+ <remove-value value-name="glAccountTypeDefault"/>
+ </simple-method>
+
<simple-method method-name="addInvoiceItemTypeGlAssignment" short-description="add a override GL account number to a invoice Itemtype for a certain organisation party.">
<!--string-to-field string="_CREATE" field-name="securityAction"/>
<check-permission permission="EXAMPLE" action="${securityAction}"><fail-property resource="ExampleUiLabels" property="ExamplePermissionError"/></check-permission>
@@ -85,8 +96,8 @@
<make-value entity-name="InvoiceItemTypeGlAccount" value-name="newEntity"/>
<set-pk-fields map-name="parameters" value-name="newEntity"/>
<set-nonpk-fields map-name="parameters" value-name="newEntity"/>
- <create-value value-name="newEntity"/>
- </simple-method>
+ <create-value value-name="newEntity"/>
+ </simple-method>
<simple-method method-name="removeInvoiceItemTypeGlAssignment" short-description="remove a override GL account number from a invoice Itemtype for a certain organisation party.">
<!--string-to-field string="_CREATE" field-name="securityAction"/>
@@ -95,7 +106,7 @@
<make-value entity-name="InvoiceItemTypeGlAccount" value-name="newEntity"/>
<set-pk-fields map-name="parameters" value-name="newEntity"/>
<remove-value value-name="newEntity"/>
- </simple-method>
+ </simple-method>
<simple-method method-name="addPaymentTypeGlAssignment" short-description="add a default GL account type to a payment Type">
<!--string-to-field string="_CREATE" field-name="securityAction"/>
Modified: ofbiz/trunk/applications/accounting/servicedef/services_admin.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_admin.xml?rev=597673&r1=597672&r2=597673&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_admin.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_admin.xml Fri Nov 23 06:31:15 2007
@@ -73,6 +73,16 @@
<attribute type="Timestamp" mode="IN" name="asOfTimestamp" optional="true"/>
</service>
+ <service name="createGlAccountTypeDefault" engine="simple"
+ location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="createGlAccountTypeDefault">
+ <description>Define a default GL account for an Account Type for a certain organisation party.</description>
+ <auto-attributes mode="IN" entity-name="GlAccountTypeDefault" include="all" optional="false"/>
+ </service>
+ <service name="removeGlAccountTypeDefault" engine="simple"
+ location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removeGlAccountTypeDefault">
+ <description>Remove a default GL account for an Account Type for a certain organisation party.</description>
+ <auto-attributes mode="IN" entity-name="GlAccountTypeDefault" include="pk" optional="false"/>
+ </service>
<service name="addInvoiceItemTypeGlAssignment" engine="simple"
location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="addInvoiceItemTypeGlAssignment">
<description>add a override GL account number to a invoice Itemtype for a certain organisation party.</description>
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=597673&r1=597672&r2=597673&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Fri Nov 23 06:31:15 2007
@@ -1136,6 +1136,10 @@
<security https="true" auth="true"/>
<response name="success" type="view" value="GlAccountSalInvoice"/>
</request-map>
+ <request-map uri="GlAccountTypeDefaults">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="GlAccountTypeDefaults"/>
+ </request-map>
<request-map uri="GlAccountSalInvoice">
<security https="true" auth="true"/>
<response name="success" type="view" value="GlAccountSalInvoice"/>
@@ -1153,6 +1157,19 @@
<response name="success" type="view" value="GlAccountNrPaymentMethod"/>
</request-map>
+ <request-map uri="createGlAccountTypeDefault">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="createGlAccountTypeDefault"/>
+ <response name="success" type="view" value="GlAccountTypeDefaults"/>
+ <response name="error" type="view" value="GlAccountTypeDefaults"/>
+ </request-map>
+ <request-map uri="removeGlAccountTypeDefault">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="removeGlAccountTypeDefault"/>
+ <response name="success" type="view" value="GlAccountTypeDefaults"/>
+ <response name="error" type="view" value="GlAccountTypeDefaults"/>
+ </request-map>
+
<request-map uri="addSalInvoiceItemTypeGlAssignment">
<security https="true" auth="true"/>
<event type="service" invoke="addInvoiceItemTypeGlAssignment"/>
@@ -1533,6 +1550,7 @@
<view-map name="TimePeriods" type="screen" page="component://accounting/widget/AdminScreens.xml#TimePeriods"/>
<view-map name="PartyAcctgPreference" type="screen" page="component://accounting/widget/AdminScreens.xml#PartyAcctgPreference"/>
<view-map name="ViewFXConversions" type="screen" page="component://accounting/widget/AdminScreens.xml#ViewFXConversions"/>
+ <view-map name="GlAccountTypeDefaults" type="screen" page="component://accounting/widget/AdminScreens.xml#GlAccountTypeDefaults"/>
<view-map name="GlAccountPurInvoice" type="screen" page="component://accounting/widget/AdminScreens.xml#GlAccountPurInvoice"/>
<view-map name="GlAccountSalInvoice" type="screen" page="component://accounting/widget/AdminScreens.xml#GlAccountSalInvoice"/>
<view-map name="GlAccountTypePaymentType" type="screen" page="component://accounting/widget/AdminScreens.xml#GlAccountTypePaymentType"/>
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml?rev=597673&r1=597672&r2=597673&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml Fri Nov 23 06:31:15 2007
@@ -217,6 +217,46 @@
<field name="submitButton" title="${uiLabelMap.AccountingUpdateFX}"><submit/></field>
</form>
+ <form name="ListGlAccountTypeDefaults" type="list" target="" list-name="glAccountTypeDefaults">
+ <actions>
+ <entity-condition entity-name="GlAccountTypeDefault" list-name="glAccountTypeDefaults">
+ <condition-list>
+ <condition-expr field-name="organizationPartyId" operator="equals" env-name="organizationPartyId"/>
+ </condition-list>
+ <order-by field-name="glAccountTypeId"/>
+ </entity-condition>
+ </actions>
+ <field name="glAccountTypeId">
+ <display-entity entity-name="GlAccountType"/>
+ </field>
+ <field name="glAccountId">
+ <display-entity entity-name="GlAccount" description="[${glAccountId}] ${accountCode} ${accountName}"/>
+ </field>
+ <field name="remove" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+ <hyperlink description="${uiLabelMap.CommonRemove}" target="removeGlAccountTypeDefault?glAccountTypeId=${glAccountTypeId}&glAccountId=${glAccountId}&organizationPartyId=${organizationPartyId}"/>
+ </field>
+ </form>
+ <form name="EditGlAccountTypeDefault" type="single" title="" target="createGlAccountTypeDefault">
+ <auto-fields-service service-name="createGlAccountTypeDefault"/>
+ <field name="organizationPartyId"><hidden value="${organizationPartyId}"/></field>
+ <field name="glAccountTypeId">
+ <drop-down>
+ <entity-options entity-name="GlAccountType" description="${description}">
+ <entity-order-by field-name="description"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="glAccountId">
+ <drop-down>
+ <entity-options entity-name="GlAccountOrganizationAndClass" description="${accountName} [${glAccountId}]">
+ <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/>
+ <entity-order-by field-name="description"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="submitButton" title="${uiLabelMap.CommonSave}"><submit/></field>
+ </form>
+
<!-- forms for Sales invoice Itemtypes to GLAccount number -->
<form name="ListSalInvoiceItemTypeGlAssignments" type="list" list-name="invoiceItemTypes">
<actions>
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=597673&r1=597672&r2=597673&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl Fri Nov 23 06:31:15 2007
@@ -23,18 +23,18 @@
<h2>${uiLabelMap.AccountingManagerApplication}</h2>
<ul>
<li<#if selected == "main"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonMain}</a></li>
- <li<#if selected == "agreement"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingAgreements}</a></li>
- <li<#if selected == "billingaccount"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingBillingMenu}</a></li>
<li<#if selected == "invoices"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingInvoicesMenu}</a></li>
<li<#if selected == "payments"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingPaymentsMenu}</a></li>
<#if security.hasEntityPermission("MANUAL", "_PAYMENT", session)>
<li<#if selected == "transaction"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingTransactions}</a></li>
</#if>
- <li<#if selected == "chartofaccounts"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingChartOfAcctsMenu}</a></li>
- <li<#if selected == "ListFixedAssets"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingFixedAssets}</a></li>
+ <li<#if selected == "billingaccount"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingBillingMenu}</a></li>
+ <li<#if selected == "FindFinAccount"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingFinAccount}</a></li>
<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.AccountingCompanies}</a></li>
- <li<#if selected == "FindFinAccount"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingFinAccount}</a></li>
<#if userLogin?has_content>
<li class="opposed"><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
<#else>
Modified: ofbiz/trunk/applications/accounting/widget/AdminScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AdminScreens.xml?rev=597673&r1=597672&r2=597673&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/AdminScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/AdminScreens.xml Fri Nov 23 06:31:15 2007
@@ -154,6 +154,29 @@
</section>
</screen>
+ <screen name="GlAccountTypeDefaults">
+ <section>
+ <actions>
+ <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
+ <set field="titleProperty" value="AccountingGlAccountTypeDefaults"/>
+ <set field="labelTitleProperty" value="${uiLabelMap.AccountingGlAccountTypeDefaults}"/>
+ <set field="tabButtonItem" value="GlAccountAssignment"/>
+ <set field="tabButtonItem2" value="GlAccountTypeDefaults"/>
+ <set field="organizationPartyId" from-field="parameters.organizationPartyId" />
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <container>
+ <include-form name="ListGlAccountTypeDefaults" location="component://accounting/webapp/accounting/admin/AdminForms.xml"/>
+ <container><label style="head1">${uiLabelMap.CommonAdd}</label></container>
+ <include-form name="EditGlAccountTypeDefault" location="component://accounting/webapp/accounting/admin/AdminForms.xml"/>
+ </container>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
<screen name="GlAccountSalInvoice">
<section>
<actions>
Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=597673&r1=597672&r2=597673&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Fri Nov 23 06:31:15 2007
@@ -447,7 +447,10 @@
</menu-item>
</menu>
<menu name="PartyAdminAssignTabBar" selected-menuitem-context-field-name="tabButtonItem2" default-menu-item-name="GlAccountSalInvoice" default-selected-style="selected"
- menu-container-style="button-bar tab-bar" type="simple">
+ menu-container-style="button-bar tab-bar" type="simple">
+ <menu-item name="GlAccountTypeDefaults" title="${uiLabelMap.AccountingGlAccountTypeDefaults}">
+ <link target="GlAccountTypeDefaults?organizationPartyId=${organizationPartyId}"/>
+ </menu-item>
<menu-item name="GlAccountSalInvoice" title="${uiLabelMap.AccountingInvoiceSales}">
<link target="GlAccountSalInvoice?organizationPartyId=${organizationPartyId}"/>
</menu-item>