[OFBiz] SVN: r7339 - in trunk/applications/accounting/script/org/ofbiz/accounting: . cost ledger
jacopo@svn.ofbiz.org
jacopo at svn.ofbiz.org
Wed Apr 19 04:13:03 CDT 2006
Author: jacopo
Date: 2006-04-19 04:12:52 -0500 (Wed, 19 Apr 2006)
New Revision: 7339
Added:
trunk/applications/accounting/script/org/ofbiz/accounting/cost/
trunk/applications/accounting/script/org/ofbiz/accounting/cost/CostServices.xml
Modified:
trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
Log:
Implemented services to manage CostComponentCalc entries.
Moved all the cost related services to new indipendent files: in my opinion all these services should be moved in a lower level component (product) together with the CostComponentCalc, WorkEffortCostCalc and GlAccountType entities.
Added: trunk/applications/accounting/script/org/ofbiz/accounting/cost/CostServices.xml
===================================================================
--- trunk/applications/accounting/script/org/ofbiz/accounting/cost/CostServices.xml 2006-04-19 06:22:58 UTC (rev 7338)
+++ trunk/applications/accounting/script/org/ofbiz/accounting/cost/CostServices.xml 2006-04-19 09:12:52 UTC (rev 7339)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+Copyright 2001-2006 The Apache Software Foundation
+
+Licensed 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.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd">
+
+ <simple-method method-name="createCostComponentCalc" short-description="Create a CostComponentCalc entry">
+ <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run createCostComponentCalc you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
+ <check-errors/>
+ <make-value entity-name="CostComponentCalc" value-name="newEntity"/>
+ <sequenced-id-to-env sequence-name="CostComponentCalc" env-name="costComponentCalcId"/>
+ <env-to-field env-name="costComponentCalcId" map-name="newEntity"/>
+ <field-to-result field-name="costComponentCalcId" result-name="costComponentCalcId"/>
+ <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+ <create-value value-name="newEntity"/>
+ </simple-method>
+ <simple-method method-name="updateCostComponentCalc" short-description="Update a CostComponentCalc entry">
+ <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run updateCostComponentCalc you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
+ <check-errors/>
+ <entity-one entity-name="CostComponentCalc" value-name="costComponentCalc"/>
+ <set-nonpk-fields map-name="parameters" value-name="costComponentCalc"/>
+ <store-value value-name="costComponentCalc"/>
+ </simple-method>
+ <simple-method method-name="removeCostComponentCalc" short-description="Remove a CostComponentCalc entry">
+ <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run removeCostComponentCalc you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
+ <check-errors/>
+ <entity-one entity-name="CostComponentCalc" value-name="costComponentCalc"/>
+ <remove-value value-name="costComponentCalc"/>
+ </simple-method>
+ <simple-method method-name="createWorkEffortCostCalc" short-description="Create a WorkEffortCostCalc entry">
+ <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run createWorkEffortCostCalc you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
+ <check-errors/>
+ <make-value entity-name="WorkEffortCostCalc" value-name="newEntity"/>
+ <set-pk-fields map-name="parameters" value-name="newEntity"/>
+ <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+ <if-empty field-name="newEntity.fromDate">
+ <now-timestamp-to-env env-name="newEntity.fromDate"/>
+ </if-empty>
+ <create-value value-name="newEntity"/>
+ </simple-method>
+ <simple-method method-name="removeWorkEffortCostCalc" short-description="Remove a WorkEffortCostCalc entry">
+ <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run removeWorkEffortCostCalc you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
+ <check-errors/>
+ <entity-one entity-name="WorkEffortCostCalc" value-name="workEffortCostCalc"/>
+ <remove-value value-name="workEffortCostCalc"/>
+ </simple-method>
+</simple-methods>
Property changes on: trunk/applications/accounting/script/org/ofbiz/accounting/cost/CostServices.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ "Date Rev Author URL Id"
Name: svn:eol-style
+ native
Modified: trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
===================================================================
--- trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml 2006-04-19 06:22:58 UTC (rev 7338)
+++ trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml 2006-04-19 09:12:52 UTC (rev 7339)
@@ -410,22 +410,4 @@
<get-related-one relation-name="Facility" value-name="item" to-value-name="facility"/>
<field-to-result field-name="facility.ownerPartyId" result-name="ownerPartyId"/>
</simple-method>
- <!-- ========= Miscellaneous Cost and Ledger-related methods ========= -->
- <simple-method method-name="createWorkEffortCostCalc" short-description="Create a WorkEffortCostCalc entry">
- <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run createWorkEffortCostCalc you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
- <check-errors/>
- <make-value entity-name="WorkEffortCostCalc" value-name="newEntity"/>
- <set-pk-fields map-name="parameters" value-name="newEntity"/>
- <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
- <if-empty field-name="newEntity.fromDate">
- <now-timestamp-to-env env-name="newEntity.fromDate"/>
- </if-empty>
- <create-value value-name="newEntity"/>
- </simple-method>
- <simple-method method-name="removeWorkEffortCostCalc" short-description="Remove a WorkEffortCostCalc entry">
- <check-permission permission="ACCOUNTING" action="_CREATE"><fail-message message="Security Error: to run removeWorkEffortCostCalc you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission"/></check-permission>
- <check-errors/>
- <entity-one entity-name="WorkEffortCostCalc" value-name="workEffortCostCalc"/>
- <remove-value value-name="workEffortCostCalc"/>
- </simple-method>
</simple-methods>
More information about the Svn
mailing list