[OFBiz] SVN: r7022 - trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt
jacopo@svn.ofbiz.org
jacopo at svn.ofbiz.org
Mon Mar 20 05:43:55 CST 2006
Author: jacopo
Date: 2006-03-20 05:43:49 -0600 (Mon, 20 Mar 2006)
New Revision: 7022
Modified:
trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
Log:
License changed to ASL2.0 (only Andy, David and I have worked on it until now).
Modified code to avoid creating inventory items directly: now the createInventoryItem service is used.
Modified: trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
===================================================================
--- trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml 2006-03-20 09:37:11 UTC (rev 7021)
+++ trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml 2006-03-20 11:43:49 UTC (rev 7022)
@@ -1,30 +1,22 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Copyright (c) 2002-2004 The Open For Business Project - www.ofbiz.org
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
- * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * @author <a href="mailto:jonesde at ofbiz.org">David E. Jones</a>
- * @author <a href="mailto:tiz at sastau.it">Jacopo Cappellato</a>
- * @version 1.0
- -->
+$Id$
+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">
@@ -131,23 +123,24 @@
<clear-field field-name="createDetailMap"/>
<else>
<!-- no non-ser inv item, create a non-ser InventoryItem with availableToPromise = -quantityNotIssued -->
- <make-value entity-name="InventoryItem" value-name="newNonSerInventoryItem"/>
- <sequenced-id-to-env sequence-name="InventoryItem" env-name="newNonSerInventoryItem.inventoryItemId"/>
- <env-to-env env-name="workEffortGoodStandard.productId" to-env-name="newNonSerInventoryItem.productId"/>
- <env-to-env env-name="workEffort.facilityId" to-env-name="newNonSerInventoryItem.facilityId"/>
- <string-to-field string="NON_SERIAL_INV_ITEM" field-name="newNonSerInventoryItem.inventoryItemTypeId"/>
- <create-value value-name="newNonSerInventoryItem"/>
-
+ <clear-field field-name="createInvItemInMap"/>
+ <clear-field field-name="createInvItemOutMap"/>
+ <set field="createInvItemInMap.productId" from-field="workEffortGoodStandard.productId"/>
+ <set field="createInvItemInMap.inventoryItemTypeId" value="NON_SERIAL_INV_ITEM"/>
+ <call-service service-name="createInventoryItem" in-map-name="createInvItemInMap">
+ <result-to-field result-name="inventoryItemId" field-name="createInvItemOutMap.inventoryItemId"/>
+ </call-service>
+
<!-- create ItemIssuance record -->
- <field-to-field field-name="workEffortId" map-name="parameters" to-map-name="issuanceCreateMap"/>
- <field-to-field field-name="inventoryItemId" map-name="newNonSerInventoryItem" to-map-name="issuanceCreateMap"/>
- <env-to-env env-name="parameters.quantityNotIssued" to-env-name="issuanceCreateMap.quantity"/>
+ <set field="issuanceCreateMap.workEffortId" from-field="parameters.workEffortId"/>
+ <set field="issuanceCreateMap.inventoryItemId" from-field="createInvItemOutMap.inventoryItemId"/>
+ <set field="issuanceCreateMap.quantity" from-field="parameters.quantityNotIssued"/>
<call-service service-name="assignInventoryToWorkEffort" in-map-name="issuanceCreateMap">
</call-service>
<!-- also create a detail record with the quantities -->
- <env-to-env env-name="newNonSerInventoryItem.inventoryItemId" to-env-name="createDetailMap.inventoryItemId"/>
- <env-to-env env-name="parameters.workEffortId" to-env-name="createDetailMap.workEffortId"/>
+ <set field="createDetailMap.inventoryItemId" from-field="createInvItemOutMap.inventoryItemId"/>
+ <set field="createDetailMap.workEffortId" from-field="parameters.workEffortId"/>
<calculate field-name="createDetailMap.availableToPromiseDiff" type="Double">
<calcop field-name="parameters.quantityNotIssued" operator="negative"/>
</calculate>
More information about the Svn
mailing list