Author: mor
Date: Tue Jan 8 05:24:13 2008 New Revision: 609967 URL: http://svn.apache.org/viewvc?rev=609967&view=rev Log: Setup Screens: implemented new screen to manage the organization's TaxAuthorityGlAccount entries With slight modification to the patch posted at Jira OFBIZ-1552. Many thanks to Sumit Porwal for the patch & Ashish Vijaywargiya, Mridul Pathak for there help. Added: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh (with props) Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml ofbiz/trunk/applications/accounting/widget/GlSetupScreens.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=609967&r1=609966&r2=609967&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Tue Jan 8 05:24:13 2008 @@ -420,6 +420,10 @@ AccountingTaxAuthority=Tax Authority AccountingTaxAuthorityParty=Tax Authority Party AccountingtaxAuthGeoId=Tax Auth Geo ID +AccountingAddTaxAuthorityGlAccount=Add TaxAuthority GL Account +AccountingTaxAuthorityGeo=Tax Authority Geo +AccountingTaxAuthorityGlAccounts=TaxAuthority GL Accounts +AccountingEditTaxAuthorityGlAccounts=Edit TaxAuthority GL Accounts AccountingTaxSummary=Tax Summary Report AccountingTermTypeId=Term Type Id AccountingTextData=Text Data Added: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh?rev=609967&view=auto ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh (added) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh Tue Jan 8 05:24:13 2008 @@ -0,0 +1,33 @@ +/* + * 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. + */ + +import org.ofbiz.base.util.UtilMisc; +import javolution.util.FastList; + +taxAuthorityHavingNoGlAccountList = FastList.newInstance(); +taxAuthorities = delegator.findAll("TaxAuthority", UtilMisc.toList("taxAuthGeoId", "taxAuthPartyId")); +iter = taxAuthorities.iterator(); +while (iter.hasNext()) { + taxAuthority = iter.next(); + taxAuthorityGlAccount = delegator.findByPrimaryKey("TaxAuthorityGlAccount", UtilMisc.toMap("taxAuthGeoId", taxAuthority.getString("taxAuthGeoId"), "taxAuthPartyId", taxAuthority.getString("taxAuthPartyId"), "organizationPartyId", organizationPartyId)); + if (taxAuthorityGlAccount == null) { + taxAuthorityHavingNoGlAccountList.add(taxAuthority); + } +} +context.put("taxAuthorityHavingNoGlAccountList", taxAuthorityHavingNoGlAccountList); \ No newline at end of file Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh ------------------------------------------------------------------------------ svn:mime-type = text/plain 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=609967&r1=609966&r2=609967&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Tue Jan 8 05:24:13 2008 @@ -1402,6 +1402,33 @@ <response name="error" type="view" value="EditVarianceReasonGlAccounts"/> </request-map> + <!-- TaxAuthorityGlAccount Requests --> + <request-map uri="editOrganizationTaxAuthorityGlAccount"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditOrganizationTaxAuthorityGlAccounts"/> + </request-map> + + <request-map uri="createOrganizationTaxAuthorityGlAccount"> + <security https="true" auth="true"/> + <event type="service" invoke="createTaxAuthorityGlAccount"/> + <response name="success" type="view" value="EditOrganizationTaxAuthorityGlAccounts"/> + <response name="error" type="view" value="EditOrganizationTaxAuthorityGlAccounts"/> + </request-map> + + <request-map uri="updateOrganizationTaxAuthorityGlAccount"> + <security https="true" auth="true"/> + <event type="service" invoke="updateTaxAuthorityGlAccount"/> + <response name="success" type="view" value="EditOrganizationTaxAuthorityGlAccounts"/> + <response name="error" type="view" value="EditOrganizationTaxAuthorityGlAccounts"/> + </request-map> + + <request-map uri="deleteOrganizationTaxAuthorityGlAccount"> + <security https="true" auth="true"/> + <event type="service" invoke="deleteTaxAuthorityGlAccount"/> + <response name="success" type="view" value="EditOrganizationTaxAuthorityGlAccounts"/> + <response name="error" type="view" value="EditOrganizationTaxAuthorityGlAccounts"/> + </request-map> + <!--request-uri CreditCardTypeGlAccount --> <request-map uri="editCreditCardTypeGlAccounts"> @@ -1881,6 +1908,7 @@ <view-map name="EditProductCategoryGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditProductCategoryGlAccounts"/> <view-map name="EditVarianceReasonGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditVarianceReasonGlAccounts"/> <view-map name="EditCreditCardTypeGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditCreditCardTypeGlAccounts"/> + <view-map name="EditOrganizationTaxAuthorityGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditOrganizationTaxAuthorityGlAccounts"/> <!-- Manual Credit Card Transaction --> <view-map name="FindGatewayResponses" page="component://accounting/widget/TransactionScreens.xml#FindGatewayResponses" type="screen"/> Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml?rev=609967&r1=609966&r2=609967&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Tue Jan 8 05:24:13 2008 @@ -664,4 +664,44 @@ </field> <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> </form> + + <form name="ListTaxAuthorityGlAccounts" type="list" target="updateOrganizationTaxAuthorityGlAccount" list-name="taxAuthorityGlAccounts"> + <auto-fields-service service-name="updateTaxAuthorityGlAccount" default-field-type="display"/> + <field name="organizationPartyId"><hidden/></field> + <field name="taxAuthGeoId" title="${uiLabelMap.AccountingTaxAuthorityGeo}"> + <display-entity entity-name="Geo" key-field-name="geoId" description="[${geoId}] ${geoName}"/> + </field> + <field name="taxAuthPartyId" title="${uiLabelMap.AccountingTaxAuthorityParty}"> + <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"> + <sub-hyperlink description="${taxAuthPartyId}" target="/partymgr/control/viewprofile?partyId=${taxAuthPartyId}" target-type="inter-app" link-style="buttontext"/> + </display-entity> + </field> + <field name="glAccountId" title="${uiLabelMap.AccountingGlAccountId}"> + <drop-down allow-empty="false"> + <list-options key-name="accountCode" list-name="glAccounts" description="${accountCode} ${accountName}"/> + </drop-down> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink target="deleteOrganizationTaxAuthorityGlAccount?organizationPartyId=${organizationPartyId}&taxAuthGeoId=${taxAuthGeoId}&taxAuthPartyId=${taxAuthPartyId}" description="${uiLabelMap.CommonDelete}"/> + </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + + <form name="AddTaxAuthorityGlAccount" type="list" target="createOrganizationTaxAuthorityGlAccount" list-name="taxAuthorityHavingNoGlAccountList"> + <field name="organizationPartyId"><hidden/></field> + <field name="taxAuthGeoId" title="${uiLabelMap.AccountingTaxAuthorityGeo}"> + <display-entity entity-name="Geo" key-field-name="geoId" description="[${geoId}] ${geoName}"/> + </field> + <field name="taxAuthPartyId" title="${uiLabelMap.AccountingTaxAuthorityParty}"> + <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"> + <sub-hyperlink description="${taxAuthPartyId}" target="/partymgr/control/viewprofile?partyId=${taxAuthPartyId}" target-type="inter-app" link-style="buttontext"/> + </display-entity> + </field> + <field name="glAccountId" title="${uiLabelMap.${uiLabelMap.AccountingGlAccountId}}"> + <drop-down allow-empty="false"> + <list-options key-name="accountCode" list-name="glAccounts" description="${accountCode} ${accountName}"/> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> + </form> </forms> Modified: ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml?rev=609967&r1=609966&r2=609967&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml Tue Jan 8 05:24:13 2008 @@ -510,5 +510,39 @@ </widgets> </section> </screen> + + <screen name="EditOrganizationTaxAuthorityGlAccounts"> + <section> + <actions> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <set field="titleProperty" value="PageTitleEditTaxAuthorityGlAccounts"/> + <set field="tabButtonItem" value="GlAccountAssignment"/> + <set field="tabButtonItem2" value="TaxAuthorityGlAccounts"/> + <set field="labelTitleProperty" value="${uiLabelMap.AccountingEditTaxAuthorityGlAccounts}"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId" /> + <entity-condition entity-name="TaxAuthorityGlAccount" list-name="taxAuthorityGlAccounts"> + <condition-expr field-name="organizationPartyId" env-name="organizationPartyId"/> + </entity-condition> + <entity-condition entity-name="GlAccountOrganizationAndClass" list-name="glAccounts" use-cache="true"> + <condition-expr field-name="organizationPartyId" env-name="organizationPartyId"/> + <order-by field-name="accountCode"/> + </entity-condition> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.bsh"/> + </actions> + <widgets> + <decorator-screen name="CommonAdminDecorator"> + <decorator-section name="body"> + <container> + <include-form name="ListTaxAuthorityGlAccounts" location="component://accounting/widget/GlSetupForms.xml"/> + <container> + <label style="head1">${uiLabelMap.AccountingAddTaxAuthorityGlAccount}</label> + </container> + <include-form name="AddTaxAuthorityGlAccount" location="component://accounting/widget/GlSetupForms.xml"/> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=609967&r1=609966&r2=609967&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/Menus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/Menus.xml Tue Jan 8 05:24:13 2008 @@ -517,6 +517,9 @@ <menu-item name="CreditCardTypeGlAccount" title="${uiLabelMap.AccountingCreditCardTypeGlAccount}"> <link target="editCreditCardTypeGlAccounts?organizationPartyId=${organizationPartyId}"/> </menu-item> + <menu-item name="TaxAuthorityGlAccounts" title="${uiLabelMap.AccountingTaxAuthorityGlAccounts}"> + <link target="editOrganizationTaxAuthorityGlAccount?organizationPartyId=${organizationPartyId}"/> + </menu-item> </menu> <menu name="PartyAccountingChecksTabBar" selected-menuitem-context-field-name="tabButtonItem2" default-menu-item-name="GlAccountSalInvoice" default-selected-style="selected" menu-container-style="button-bar tab-bar" type="simple"> |
Free forum by Nabble | Edit this page |