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/14 13:57:41 UTC
svn commit: r604182 - in /ofbiz/trunk/applications: accounting/config/
accounting/webapp/accounting/WEB-INF/
accounting/webapp/accounting/includes/ accounting/widget/
manufacturing/widget/manufacturing/
Author: ashish
Date: Fri Dec 14 04:57:40 2007
New Revision: 604182
URL: http://svn.apache.org/viewvc?rev=604182&view=rev
Log:
Applied patch from JIRA Issue # OFBIZ-1503 with minor changes.
Thanks Jyotsna Rathore for your patch.
Added:
ofbiz/trunk/applications/accounting/widget/CostForms.xml (with props)
ofbiz/trunk/applications/accounting/widget/CostScreens.xml (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/manufacturing/widget/manufacturing/CostForms.xml
Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties?rev=604182&r1=604181&r2=604182&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Fri Dec 14 04:57:40 2007
@@ -135,6 +135,7 @@
AccountingCreateBillingAccountRolePermissionError=Security Error : to run createBillingAccountRole you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission
AccountingCreateBillingAccountTerm=Create Billing Account Term
AccountingCreateBillingAccountTermPermissionError=Security Error : to run createBillingAccountTerm you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission
+AccountingCreateCostComponentCalc=Create New Cost Component Calc
AccountingCreateFixedAssetMaintOrderPermissionError = Security Error: to run createFixedAssetMaintOrder you must have the ACCOUNTING_CREATEUPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission
AccountingCreateNewCreditCard=Create New Credit Card
AccountingCreateNewEftAccount=Create New EFT Account
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=604182&r1=604181&r2=604182&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Fri Dec 14 04:57:40 2007
@@ -1563,6 +1563,30 @@
<response name="error" type="view" value="EditPartyFixedAssetAssignments"/>
</request-map>
+ <!--=================Cost calculation request===============-->
+ <request-map uri="EditCostCalcs">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="EditCostCalcs"/>
+ </request-map>
+ <request-map uri="createCostComponentCalc">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="createCostComponentCalc"/>
+ <response name="success" type="view" value="EditCostCalcs"/>
+ <response name="error" type="view" value="EditCostCalcs"/>
+ </request-map>
+ <request-map uri="updateCostComponentCalc">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="updateCostComponentCalc"/>
+ <response name="success" type="view" value="EditCostCalcs"/>
+ <response name="error" type="view" value="EditCostCalcs"/>
+ </request-map>
+ <request-map uri="deleteCostComponentCalc">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="removeCostComponentCalc"/>
+ <response name="success" type="view" value="EditCostCalcs"/>
+ <response name="error" type="view" value="EditCostCalcs"/>
+ </request-map>
+
<!-- ================ Entity Lookup Requests ================= -->
<request-map uri="LookupProduct"><security auth="true" https="true"/><response name="success" type="view" value="LookupProduct"/></request-map>
<request-map uri="LookupProductFeature"><security auth="true" https="true"/><response name="success" type="view" value="LookupProductFeature"/></request-map>
@@ -1789,6 +1813,9 @@
<!-- Assignment Mappings -->
<view-map name="EditPartyFixedAssetAssignments" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#EditPartyFixedAssetAssignments"/>
-
+
+ <!-- Cost request mapping-->
+ <view-map name="EditCostCalcs" type="screen" page="component://accounting/widget/CostScreens.xml#EditCostCalcs"/>
+
<!-- end of view mappings -->
</site-conf>
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=604182&r1=604181&r2=604182&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/includes/appheader.ftl Fri Dec 14 04:57:40 2007
@@ -35,6 +35,7 @@
<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>
<#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=604182&r1=604181&r2=604182&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Fri Dec 14 04:57:40 2007
@@ -27,6 +27,7 @@
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="ManufacturingUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<set field="layoutSettings.companyName" from-field="uiLabelMap.AccountingCompanyName" global="true"/>
Added: ofbiz/trunk/applications/accounting/widget/CostForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CostForms.xml?rev=604182&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CostForms.xml (added)
+++ ofbiz/trunk/applications/accounting/widget/CostForms.xml Fri Dec 14 04:57:40 2007
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+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.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+ <form name="ListCostComponentCalc" type="list" list-name="allCostComponentCalcs" use-row-submit="true" target="updateCostComponentCalc">
+ <auto-fields-entity entity-name="CostComponentCalc" default-field-type="display"/>
+ <field name="costComponentCalcId" widget-style="buttontext"></field>
+ <field name="costGlAccountTypeId">
+ <drop-down allow-empty="false">
+ <entity-options entity-name="GlAccountType" key-field-name="glAccountTypeId" description="${description}"/>
+ </drop-down>
+ </field>
+ <field name="offsettingGlAccountTypeId">
+ <drop-down allow-empty="true">
+ <entity-options entity-name="GlAccountType" key-field-name="glAccountTypeId" description="${description}"/>
+ </drop-down>
+ </field>
+ <field name="updateCostComponentCalc" title="${uiLabelMap.CommonUpdate}"><submit/></field>
+ <field name="costCustomMethodId"><display-entity entity-name="CustomMethod" key-field-name="customMethodId" description="${description}"/></field>
+ <field name="deleteCostComponentCalc" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+ <hyperlink target="deleteCostComponentCalc?costComponentCalcId=${costComponentCalcId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+ </field>
+ </form>
+ <form name="AddCostComponentCalc" type="single" target="createCostComponentCalc">
+ <auto-fields-service service-name="createCostComponentCalc"/>
+ <field name="costGlAccountTypeId">
+ <drop-down allow-empty="false">
+ <entity-options entity-name="GlAccountType" key-field-name="glAccountTypeId" description="${description}"/>
+ </drop-down>
+ </field>
+ <field name="offsettingGlAccountTypeId">
+ <drop-down allow-empty="true">
+ <entity-options entity-name="GlAccountType" key-field-name="glAccountTypeId" description="${description}"/>
+ </drop-down>
+ </field>
+ <field name="currencyUomId" title="${uiLabelMap.CommonCurrency}">
+ <drop-down allow-empty="false" no-current-selected-key="${defaultCurrencyUomId}">
+ <entity-options key-field-name="uomId" description="${abbreviation} - ${description}" entity-name="Uom">
+ <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/>
+ <entity-order-by field-name="abbreviation"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="costCustomMethodId">
+ <drop-down allow-empty="true">
+ <entity-options entity-name="CustomMethod" key-field-name="customMethodId" description="${description}">
+ <entity-constraint name="customMethodTypeId" operator="equals" value="COST_FORMULA"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit">
+ <submit button-type="button"/>
+ </field>
+ </form>
+</forms>
\ No newline at end of file
Propchange: ofbiz/trunk/applications/accounting/widget/CostForms.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/applications/accounting/widget/CostForms.xml
------------------------------------------------------------------------------
svn:keywords = Date Rev Author URL Id
Propchange: ofbiz/trunk/applications/accounting/widget/CostForms.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ofbiz/trunk/applications/accounting/widget/CostScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CostScreens.xml?rev=604182&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CostScreens.xml (added)
+++ ofbiz/trunk/applications/accounting/widget/CostScreens.xml Fri Dec 14 04:57:40 2007
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+ <screen name="EditCostCalcs">
+ <section>
+ <actions>
+ <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="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"/>
+
+ <entity-condition entity-name="CostComponentCalc" list-name="allCostComponentCalcs"/>
+ <entity-one entity-name="CostComponentCalc" value-name="costComponentCalc"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <container>
+ <label style="head1">${uiLabelMap.ManufacturingManageCostComponentCalc}</label>
+ </container>
+ <container>
+ <label style="head2">${uiLabelMap.ManufacturingListCostComponentCalc}</label>
+ </container>
+ <include-form name="ListCostComponentCalc" location="component://accounting/widget/CostForms.xml"/>
+ <container>
+ <label style="head2">${uiLabelMap.AccountingCreateCostComponentCalc}</label>
+ </container>
+ <include-form name="AddCostComponentCalc" location="component://accounting/widget/CostForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+</screens>
+
Propchange: ofbiz/trunk/applications/accounting/widget/CostScreens.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/applications/accounting/widget/CostScreens.xml
------------------------------------------------------------------------------
svn:keywords = Date Rev Author URL Id
Propchange: ofbiz/trunk/applications/accounting/widget/CostScreens.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/CostForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/CostForms.xml?rev=604182&r1=604181&r2=604182&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/CostForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/CostForms.xml Fri Dec 14 04:57:40 2007
@@ -25,12 +25,8 @@
<field name="costComponentCalcId" widget-style="buttontext">
<hyperlink target="EditCostCalcs?costComponentCalcId=${costComponentCalcId}" description="${costComponentCalcId}" also-hidden="false"/>
</field>
- <field name="costGlAccountTypeId">
- <display-entity entity-name="GlAccountType" key-field-name="glAccountTypeId"/>
- </field>
- <field name="offsettingGlAccountTypeId">
- <display-entity entity-name="GlAccountType" key-field-name="glAccountTypeId"/>
- </field>
+ <field name="costGlAccountTypeId"><hidden/></field>
+ <field name="offsettingGlAccountTypeId"><hidden/></field>
<field name="currencyUomId" title="${uiLabelMap.CommonCurrency}">
<display-entity entity-name="Uom" key-field-name="uomId"/>
</field>
@@ -45,16 +41,8 @@
<alt-target use-when="costComponentCalc==null" target="createCostComponentCalc"/>
<auto-fields-entity entity-name="CostComponentCalc" default-field-type="edit"/>
<field name="costComponentCalcId"><display/></field>
- <field name="costGlAccountTypeId">
- <drop-down allow-empty="false">
- <entity-options entity-name="GlAccountType" key-field-name="glAccountTypeId" description="${description}"/>
- </drop-down>
- </field>
- <field name="offsettingGlAccountTypeId">
- <drop-down allow-empty="true">
- <entity-options entity-name="GlAccountType" key-field-name="glAccountTypeId" description="${description}"/>
- </drop-down>
- </field>
+ <field name="costGlAccountTypeId"><hidden/></field>
+ <field name="offsettingGlAccountTypeId"><hidden/></field>
<field name="currencyUomId" title="${uiLabelMap.CommonCurrency}">
<drop-down allow-empty="false" no-current-selected-key="${defaultCurrencyUomId}">
<entity-options key-field-name="uomId" description="${abbreviation} - ${description}" entity-name="Uom">