You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/06/14 08:03:15 UTC

svn commit: r667748 [11/16] - in /ofbiz/trunk: applications/accounting/script/org/ofbiz/accounting/agreement/ applications/accounting/script/org/ofbiz/accounting/cost/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/account...

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Fri Jun 13 23:03:12 2008
@@ -24,10 +24,10 @@
     <!-- a method to centralize facility security code, meant to be called in-line with
         call-simple-method, and the checkAction and callingMethodName attributes should be in the method context -->
     <simple-method method-name="checkFacilityRelatedPermission" short-description="Check Facility Related Permission">
-        <if-empty field-name="callingMethodName">
+        <if-empty field="callingMethodName">
             <set value="this operation" field="callingMethodName"/>
         </if-empty>
-        <if-empty field-name="checkAction">
+        <if-empty field="checkAction">
             <set value="UPDATE" field="checkAction"/>
         </if-empty>
         
@@ -40,7 +40,7 @@
                         <if-has-permission permission="FACILITY" action="_${checkAction}"/>
                         <if-has-permission permission="FACILITY_ADMIN"/>
                         <and>
-                            <not><if-empty field-name="alternatePermissionRoot"/></not>
+                            <not><if-empty field="alternatePermissionRoot"/></not>
                             <if-has-permission permission="${alternatePermissionRoot}" action="_${checkAction}"/>
                         </and>
                     </or>
@@ -53,7 +53,7 @@
     </simple-method>
     <simple-method method-name="facilityGenericPermission" short-description="Main permission logic">
         <set field="mainAction" from-field="parameters.mainAction"/>
-        <if-empty field-name="mainAction">
+        <if-empty field="mainAction">
             <add-error><fail-message message="In the permission-service element for the facilityGenericPermission service the main-action attribute was missing but is required"/></add-error>
             <check-errors/>
         </if-empty>
@@ -62,7 +62,7 @@
         <set field="checkAction" from-field="parameters.mainAction"/>
         <call-simple-method method-name="checkFacilityRelatedPermission"/>
         
-        <if-empty field-name="error_list">
+        <if-empty field="error_list">
             <set field="hasPermission" type="Boolean" value="true"/>
             <field-to-result field-name="hasPermission"/>
 
@@ -75,22 +75,22 @@
         </if-empty>
     </simple-method>
     <simple-method method-name="checkProductFacilityRelatedPermission" short-description="ProductFacility Permission Checking Logic">
-         <if-empty field-name="mainAction">
+         <if-empty field="mainAction">
             <set field="mainAction" from-field="parameters.mainAction"/>
-            <if-empty field-name="mainAction">
+            <if-empty field="mainAction">
                 <add-error><fail-property resource="CommonUiLabels" property="CommonPermissionMainActionAttributeMissing"/></add-error>
             </if-empty>
         </if-empty>
         <check-errors/>
         <set field="resourceDescription" from-field="parameters.resourceDescription"/>
-        <if-empty field-name="resourceDescription">
+        <if-empty field="resourceDescription">
             <property-to-field resource="CommonUiLabels" property="CommonPermissionThisOperation" field-name="resourceDescription"/>
         </if-empty>
         <set field="callingMethodName" from-field="resourceDescription" />
         <set field="checkAction" from-field="mainAction" />
         <set field="alternatePermissionRoot" value="FACILITY"/>
         <call-simple-method method-name="checkProductRelatedPermission" xml-resource="org/ofbiz/product/product/ProductServices.xml"/>
-        <if-empty field-name="error_list">
+        <if-empty field="error_list">
             <set field="hasPermission" type="Boolean" value="true"/>
             <field-to-result field-name="hasPermission"/>
             
@@ -121,8 +121,8 @@
         <if>
             <condition>
                 <or>
-                    <not><if-empty field-name="parameters.availableToPromiseTotal"/></not>
-                    <not><if-empty field-name="parameters.quantityOnHandTotal"/></not>
+                    <not><if-empty field="parameters.availableToPromiseTotal"/></not>
+                    <not><if-empty field="parameters.quantityOnHandTotal"/></not>
                 </or>
             </condition>
             <then>
@@ -135,7 +135,7 @@
         </if>
     </simple-method>
     <simple-method method-name="inventoryItemCheckSetDefaultValues" short-description="Check and, if empty, fills with default values ownerPartyId, currencyUomId, unitCost" login-required="false">
-        <if-empty field-name="inventoryItem">
+        <if-empty field="inventoryItem">
             <entity-one entity-name="InventoryItem" value-name="inventoryItem"/>
             <set field="updateInventoryItem" value="Y"/>
         </if-empty>
@@ -143,28 +143,28 @@
         <if>
             <condition>
                 <and>
-                    <not><if-empty field-name="inventoryItem.facilityId"/></not>
-                    <not><if-empty field-name="inventoryItem.ownerPartyId"/></not>
-                    <not><if-empty field-name="inventoryItem.currencyUomId"/></not>
-                    <not><if-empty field-name="inventoryItem.unitCost"/></not>
+                    <not><if-empty field="inventoryItem.facilityId"/></not>
+                    <not><if-empty field="inventoryItem.ownerPartyId"/></not>
+                    <not><if-empty field="inventoryItem.currencyUomId"/></not>
+                    <not><if-empty field="inventoryItem.unitCost"/></not>
                 </and>
             </condition>
             <then>
                 <return/>
             </then>
         </if>
-        <if-empty field-name="inventoryItem.facilityId">
+        <if-empty field="inventoryItem.facilityId">
             <add-error>
                 <fail-message message="Error: you cannot create inventory items with no facility id."/>
             </add-error>
             <check-errors/>
         </if-empty>
         <!-- if inventoryItem's ownerPartyId is empty, get the ownerPartyId from the facility -->
-        <if-empty field-name="inventoryItem.ownerPartyId">
+        <if-empty field="inventoryItem.ownerPartyId">
             <get-related-one value-name="inventoryItem" relation-name="Facility" to-value-name="facility"/>
             <set field="inventoryItem.ownerPartyId" from-field="facility.ownerPartyId"/>
             <!-- if inventoryItem's ownerPartyId is still empty, return an error message -->
-            <if-empty field-name="inventoryItem.ownerPartyId">
+            <if-empty field="inventoryItem.ownerPartyId">
                 <add-error>
                     <fail-message message="Error: you cannot create inventory items with no ownerPartyId."/>
                 </add-error>
@@ -173,17 +173,17 @@
         </if-empty>
         <!-- if inventoryItem's currencyUomId is empty, get the currencyUomId 
              from the party accounting preferences of the owner of the inventory item -->
-        <if-empty field-name="inventoryItem.currencyUomId">
+        <if-empty field="inventoryItem.currencyUomId">
             <set field="partyAccountingPreferencesCallMap.organizationPartyId" from-field="inventoryItem.ownerPartyId"/>
             <call-service service-name="getPartyAccountingPreferences" in-map-name="partyAccountingPreferencesCallMap">
                  <result-to-field result-name="partyAccountingPreference" field-name="accPref"/>
             </call-service>
             <set field="inventoryItem.currencyUomId" from-field="accPref.baseCurrencyUomId"/>
-            <if-empty field-name="inventoryItem.currencyUomId">
+            <if-empty field="inventoryItem.currencyUomId">
                 <property-to-field resource="general" property="currency.uom.id.default" field-name="inventoryItem.currencyUomId"/>
             </if-empty>
             <!-- if inventoryItem's currencyUomId is still empty, return an error message -->
-            <if-empty field-name="inventoryItem.currencyUomId">
+            <if-empty field="inventoryItem.currencyUomId">
                 <add-error>
                     <fail-message message="Error: you cannot create inventory items with no currencyUomId; you can set a default currency in the PartyAcctgPreference for the party [${inventoryItem.ownerPartyId}], or in the general.properties file under the key [currency.uom.id.default]."/>
                 </add-error>
@@ -192,7 +192,7 @@
         </if-empty>
         <!-- if inventoryItem's unitCost is empty, get the product's standard 
              cost by calling the getProductCost service -->
-        <if-empty field-name="inventoryItem.unitCost">
+        <if-empty field="inventoryItem.unitCost">
             <set from-field="inventoryItem.productId" field="inputMap.productId"/>
             <set from-field="inventoryItem.currencyUomId" field="inputMap.currencyUomId"/>
             <set value="EST_STD" field="inputMap.costComponentTypePrefix"/> <!-- TODO: create a new service getProductStdCost that calls getProductCost -->
@@ -202,7 +202,7 @@
         </if-empty>
         <!-- if inventoryItem's unitCost is still empty, or negative return an error message -->
         <!-- TODO/WARNING: getProductCost returns 0 even if no std costs are found -->
-        <if-empty field-name="inventoryItem.unitCost">
+        <if-empty field="inventoryItem.unitCost">
             <add-error>
                 <fail-message message="Error: you cannot create inventory items with no unitCost."/>
             </add-error>
@@ -211,13 +211,13 @@
         <!-- if you don't want inventory item with unitCost = 0, change the operator 
              attribute from "less" to "less-equals".
         -->
-        <if-compare field-name="inventoryItem.unitCost" operator="less" value="0" type="Double">
+        <if-compare field="inventoryItem.unitCost" operator="less" value="0" type="Double">
             <add-error>
                 <fail-message message="Error: you cannot create inventory items with a negative unitCost."/>
             </add-error>
         </if-compare>
         <check-errors/>
-        <if-not-empty field-name="updateInventoryItem">
+        <if-not-empty field="updateInventoryItem">
             <store-value value-name="inventoryItem"/>
         </if-not-empty>
     </simple-method>
@@ -227,15 +227,15 @@
         <make-value entity-name="InventoryItem" value-name="lookupPKMap"/>
         <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
         <find-by-primary-key map-name="lookupPKMap" value-name="lookedUpValue"/>
-        <if-empty field-name="lookedUpValue.ownerPartyId">
+        <if-empty field="lookedUpValue.ownerPartyId">
             <get-related-one value-name="lookedUpValue" relation-name="Facility" to-value-name="oldFacility"/>
             <set field="lookedUpValue.ownerPartyId" from-field="oldFacility.ownerPartyId"/>
         </if-empty>
         <field-to-result field-name="lookedUpValue.ownerPartyId" result-name="oldOwnerPartyId"/>
         <field-to-result field-name="lookedUpValue.statusId" result-name="oldStatusId"/>
         <!-- special handling for the unitCost -->
-        <if-not-empty field-name="parameters.unitCost">
-            <if-compare field-name="parameters.unitCost" operator="less" value="0.0" type="Double">
+        <if-not-empty field="parameters.unitCost">
+            <if-compare field="parameters.unitCost" operator="less" value="0.0" type="Double">
                 <add-error><fail-message message="Unit cost for inventory item [${lookupPKMap.inventoryItemId}] cannot be negative."/></add-error>
                 <check-errors/>
             </if-compare>
@@ -244,8 +244,8 @@
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
         <store-value value-name="lookedUpValue"/>
         <!-- if the unit cost is changed create an InventoryItemDetail to keep track of unit cost history -->
-        <if-not-empty field-name="parameters.unitCost">
-            <if-compare-field field-name="parameters.unitCost" operator="not-equals" to-field-name="oldUnitCost">
+        <if-not-empty field="parameters.unitCost">
+            <if-compare-field field="parameters.unitCost" to-field="oldUnitCost" operator="not-equals">
                 <set field="createInventoryItemDetailInMap.inventoryItemId" from-field="lookedUpValue.inventoryItemId"/>
                 <set field="createInventoryItemDetailInMap.unitCost" from-field="parameters.unitCost"/>
                 <call-service service-name="createInventoryItemDetail" in-map-name="createInventoryItemDetailInMap"/>
@@ -262,7 +262,7 @@
             <order-by field-name="-statusDatetime"/>
         </entity-and>
         <first-from-list entry-name="oldInventoryItemStatus" list-name="oldInventoryItemStatusList"/>
-        <if-not-empty field-name="oldInventoryItemStatus">
+        <if-not-empty field="oldInventoryItemStatus">
             <set field="oldInventoryItemStatus.statusEndDatetime" from-field="nowTimestamp"/>
             <store-value value-name="oldInventoryItemStatus"/>
         </if-not-empty>
@@ -273,7 +273,7 @@
         <set field="inventoryItemStatus.statusDatetime" from-field="nowTimestamp"/>
         
         <!-- make sure the current productId is set, if not passed in look up the current value -->
-        <if-empty field-name="inventoryItemStatus.productId">
+        <if-empty field="inventoryItemStatus.productId">
             <entity-one entity-name="InventoryItem" value-name="inventoryItem"/>
             <set field="inventoryItemStatus.productId" from-field="inventoryItem.productId"/>
         </if-empty>
@@ -292,7 +292,7 @@
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         
         <!-- set the effectiveDate; if from an ItemIssuance lookup the issuedDateTime -->
-        <if-not-empty field-name="parameters.itemIssuanceId">
+        <if-not-empty field="parameters.itemIssuanceId">
             <entity-one entity-name="ItemIssuance" value-name="itemIssuance"/>
             <set field="newEntity.effectiveDate" from-field="itemIssuance.issuedDateTime"/>
             <else>
@@ -301,8 +301,8 @@
         </if-not-empty>
 
         <!-- if availableToPromiseDiff or quantityOnHandDiff are empty set to 0 -->
-        <if-empty field-name="newEntity.availableToPromiseDiff"><set field="newEntity.availableToPromiseDiff" value="0" type="Double"/></if-empty>
-        <if-empty field-name="newEntity.quantityOnHandDiff"><set field="newEntity.quantityOnHandDiff" value="0" type="Double"/></if-empty>
+        <if-empty field="newEntity.availableToPromiseDiff"><set field="newEntity.availableToPromiseDiff" value="0" type="Double"/></if-empty>
+        <if-empty field="newEntity.quantityOnHandDiff"><set field="newEntity.quantityOnHandDiff" value="0" type="Double"/></if-empty>
 
         <create-value value-name="newEntity"/>
     </simple-method>
@@ -317,15 +317,15 @@
 
     <simple-method method-name="updateSerializedInventoryTotals" short-description="Update the totals on serialized inventory">
         <entity-one entity-name="InventoryItem" value-name="inventoryItem"/>
-        <if-compare field-name="inventoryItem.inventoryItemTypeId" value="SERIALIZED_INV_ITEM" operator="equals">
+        <if-compare field="inventoryItem.inventoryItemTypeId" value="SERIALIZED_INV_ITEM" operator="equals">
             <if>
                 <!-- available -->
                 <condition>
                     <and>
-                        <if-compare field-name="inventoryItem.statusId" value="INV_AVAILABLE" operator="equals"/>
+                        <if-compare field="inventoryItem.statusId" value="INV_AVAILABLE" operator="equals"/>
                         <or>
-                            <if-compare field-name="inventoryItem.availableToPromiseTotal" operator="not-equals" value="1" type="Double"/>
-                            <if-compare field-name="inventoryItem.quantityOnHandTotal" operator="not-equals" value="1" type="Double"/>
+                            <if-compare field="inventoryItem.availableToPromiseTotal" operator="not-equals" value="1" type="Double"/>
+                            <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="1" type="Double"/>
                         </or>
                     </and>
                 </condition>
@@ -340,10 +340,10 @@
                 <else-if>
                     <condition>
                         <and>
-                            <if-compare field-name="inventoryItem.statusId" value="INV_DELIVERED" operator="equals"/>
+                            <if-compare field="inventoryItem.statusId" value="INV_DELIVERED" operator="equals"/>
                             <or>
-                                <if-compare field-name="inventoryItem.availableToPromiseTotal" operator="not-equals" value="0" type="Double"/>
-                                <if-compare field-name="inventoryItem.quantityOnHandTotal" operator="not-equals" value="0" type="Double"/>
+                                <if-compare field="inventoryItem.availableToPromiseTotal" operator="not-equals" value="0" type="Double"/>
+                                <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="0" type="Double"/>
                             </or>
                         </and>
                     </condition>
@@ -359,11 +359,11 @@
                 <else-if>
                     <condition>
                         <and>
-                            <if-compare field-name="inventoryItem.statusId" operator="not-equals" value="INV_AVAILABLE"/>
-                            <if-compare field-name="inventoryItem.statusId" operator="not-equals" value="INV_DELIVERED"/>
+                            <if-compare field="inventoryItem.statusId" operator="not-equals" value="INV_AVAILABLE"/>
+                            <if-compare field="inventoryItem.statusId" operator="not-equals" value="INV_DELIVERED"/>
                             <or>
-                                <if-compare field-name="inventoryItem.availableToPromiseTotal" operator="not-equals" value="0" type="Double"/>
-                                <if-compare field-name="inventoryItem.quantityOnHandTotal" operator="not-equals" value="1" type="Double"/>
+                                <if-compare field="inventoryItem.availableToPromiseTotal" operator="not-equals" value="0" type="Double"/>
+                                <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="1" type="Double"/>
                             </or>
                         </and>
                     </condition>
@@ -410,8 +410,8 @@
         <now-timestamp-to-env env-name="nowTimestamp"/>
 
         <!-- if discontinueProductSales field is empty and the product is a variant, get the fieldcontent from the virtual product -->
-        <if-not-empty field-name="product">
-            <if-compare field-name="product.isVariant" value="Y" operator="equals">
+        <if-not-empty field="product">
+            <if-compare field="product.isVariant" value="Y" operator="equals">
                 <!-- retrieve related virtual product because also to be used later -->
                 <set field="getAssoc.productIdTo" from-field="product.productId"/>
                 <set field="getAssoc.productAssocTypeId" value="PRODUCT_VARIANT"/>
@@ -419,7 +419,7 @@
                 <filter-list-by-date list-name="assocs" to-list-name="assocsDate"/>
                 <first-from-list entry-name="assoc" list-name="assocsDate"/>
                 <get-related-one value-name="assoc" relation-name="MainProduct" to-value-name="virtProduct"/>
-                <if-empty field-name="product.salesDiscWhenNotAvail">
+                <if-empty field="product.salesDiscWhenNotAvail">
                     <set field="product.salesDiscWhenNotAvail" from-field="virtProduct.salesDiscWhenNotAvail"/>
                 </if-empty>
             </if-compare>
@@ -429,11 +429,11 @@
         <if>
             <condition>
                 <and>
-                    <not><if-empty field-name="product"/></not>
-                    <if-compare field-name="product.salesDiscWhenNotAvail" operator="equals" value="Y"/>
+                    <not><if-empty field="product"/></not>
+                    <if-compare field="product.salesDiscWhenNotAvail" operator="equals" value="Y"/>
                     <or>
-                        <if-empty field-name="product.salesDiscontinuationDate"/>
-                        <if-compare-field field-name="product.salesDiscontinuationDate" operator="greater" to-field-name="nowTimestamp" type="Timestamp"/>
+                        <if-empty field="product.salesDiscontinuationDate"/>
+                        <if-compare-field field="product.salesDiscontinuationDate" to-field="nowTimestamp" operator="greater" type="Timestamp"/>
                     </or>
                 </and>
             </condition>
@@ -442,19 +442,19 @@
                 <call-service service-name="getProductInventoryAvailable" in-map-name="productIdMap">
                     <result-to-field result-name="availableToPromiseTotal"/>
                 </call-service>
-                <if-compare field-name="availableToPromiseTotal" operator="less-equals" value="0" type="Double">
+                <if-compare field="availableToPromiseTotal" operator="less-equals" value="0" type="Double">
                     <set from-field="parameters.productId" field="discontinueProductSalesMap.productId"/>
                     <call-service service-name="discontinueProductSales" in-map-name="discontinueProductSalesMap"/>
                 </if-compare>
                                 
                 <!-- check if related virtual product has no variant left, if yes discontinue the virtual product too when salesDiscWhenNotAvail is 'Y'-->
-                <if-not-empty field-name="virtProduct">
-                    <if-compare field-name="virtProduct.salesDiscWhenNotAvail" operator="equals" value="Y">
+                <if-not-empty field="virtProduct">
+                    <if-compare field="virtProduct.salesDiscWhenNotAvail" operator="equals" value="Y">
                         <set field="getFromAssoc.productId" from-field="virtProduct.productId"/>
                         <set field="getFromAssoc.productAssocTypeId" value="PRODUCT_VARIANT"/>
                         <find-by-and entity-name="ProductAssoc" map-name="getFromAssoc" list-name="assocs"/>
                         <filter-list-by-date list-name="assocs" to-list-name="assocsDate"/>
-                        <if-empty field-name="assocsDate">
+                        <if-empty field="assocsDate">
                             <set from-field="virtProduct.productId" field="discontinueProductSalesMap.productId"/>
                             <call-service service-name="discontinueProductSales" in-map-name="discontinueProductSalesMap"/>
                         </if-empty>
@@ -473,7 +473,7 @@
         <set-pk-fields map-name="parameters" value-name="inventoryItemLookup"/>
         <find-by-primary-key map-name="inventoryItemLookup" value-name="inventoryItem"/>
 
-        <if-compare field-name="inventoryItemTypeId" map-name="inventoryItem" operator="not-equals" value="NON_SERIAL_INV_ITEM">
+        <if-compare field="inventoryItem.inventoryItemTypeId" operator="not-equals" value="NON_SERIAL_INV_ITEM">
             <string-to-list string="Can only create an InventoryItemVariance for a Non-Serialized Inventory Item" list-name="error_list"/>
         </if-compare>
         <check-errors/>
@@ -500,10 +500,10 @@
         <make-value value-name="newEntity" entity-name="PhysicalInventory"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
 
-        <if-empty field-name="newEntity.physicalInventoryDate">
+        <if-empty field="newEntity.physicalInventoryDate">
             <now-timestamp-to-env env-name="newEntity.physicalInventoryDate"/>
         </if-empty>
-        <if-empty field-name="newEntity.partyId">
+        <if-empty field="newEntity.partyId">
             <set from-field="userLogin.partyId" field="newEntity.partyId"/>
         </if-empty>
 
@@ -601,12 +601,12 @@
                     if the parameters.locationSeqId string is equal to "nullField" then
                     set the lookupFieldMap.locationSeqId to null 
         -->
-        <if-compare field-name="parameters.locationSeqId" operator="equals" value="nullField">
+        <if-compare field="parameters.locationSeqId" operator="equals" value="nullField">
             <set from-field="nullField" field="lookupFieldMap.locationSeqId"/>
         </if-compare>
 
         <!-- we might get away with a cache here since real serious errors will occur during the reservation service... but only if we need the speed -->
-        <if-compare field-name="parameters.useCache" operator="equals" value="true" type="Boolean">
+        <if-compare field="parameters.useCache" operator="equals" value="true" type="Boolean">
             <find-by-and entity-name="InventoryItem" map-name="lookupFieldMap" list-name="inventoryItems" use-iterator="true" use-cache="true"/>
             <else>
                 <find-by-and entity-name="InventoryItem" map-name="lookupFieldMap" list-name="inventoryItems" use-iterator="true" use-cache="false"/>
@@ -616,13 +616,13 @@
         <set field="parameters.availableToPromiseTotal" value="0" type="Double"/>
         <set field="parameters.quantityOnHandTotal" value="0" type="Double"/>
         <iterate entry-name="inventoryItem" list-name="inventoryItems">
-            <if-compare field-name="inventoryItem.inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM">
+            <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM">
                 <if>
                     <condition>
                         <or>
-                            <if-compare field-name="inventoryItem.statusId" value="INV_AVAILABLE" operator="equals"/>
-                            <if-compare field-name="inventoryItem.statusId" value="INV_PROMISED" operator="equals"/>
-                            <if-compare field-name="inventoryItem.statusId" value="INV_BEING_TRANSFERED" operator="equals"/>
+                            <if-compare field="inventoryItem.statusId" value="INV_AVAILABLE" operator="equals"/>
+                            <if-compare field="inventoryItem.statusId" value="INV_PROMISED" operator="equals"/>
+                            <if-compare field="inventoryItem.statusId" value="INV_BEING_TRANSFERED" operator="equals"/>
                         </or>
                     </condition>
                     <then>
@@ -631,34 +631,34 @@
                         </calculate>
                     </then>
                 </if>
-                <if-compare value="INV_AVAILABLE" operator="equals" field-name="inventoryItem.statusId">
+                <if-compare value="INV_AVAILABLE" operator="equals" field="inventoryItem.statusId">
                     <calculate field-name="parameters.availableToPromiseTotal" type="Double">
                         <calcop field-name="parameters.availableToPromiseTotal" operator="add"><number value="1.0"/></calcop>
                     </calculate>
                 </if-compare>
             </if-compare>
-            <if-compare field-name="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
+            <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
                 <if>
                     <condition>
                         <or>
                             <and>
-                                <not><if-empty field-name="parameters.statusId"/></not>
-                                <if-compare-field operator="equals" field-name="parameters.statusId" to-field-name="inventoryItem.statusId"/>
+                                <not><if-empty field="parameters.statusId"/></not>
+                                <if-compare-field operator="equals" field="parameters.statusId" to-field="inventoryItem.statusId"/>
                             </and>
                             <and>
-                                <if-empty field-name="parameters.statusId"/>
-                                <if-empty field-name="inventoryItem.statusId"/>
+                                <if-empty field="parameters.statusId"/>
+                                <if-empty field="inventoryItem.statusId"/>
                             </and>
                         </or>
                     </condition>
                     <then>
-                        <if-not-empty field-name="inventoryItem.quantityOnHandTotal">
+                        <if-not-empty field="inventoryItem.quantityOnHandTotal">
                             <calculate field-name="parameters.quantityOnHandTotal" type="Double">
                                 <calcop operator="get" field-name="parameters.quantityOnHandTotal"/>
                                 <calcop operator="get" field-name="inventoryItem.quantityOnHandTotal"/>
                             </calculate>
                         </if-not-empty>
-                        <if-not-empty field-name="inventoryItem.availableToPromiseTotal">
+                        <if-not-empty field="inventoryItem.availableToPromiseTotal">
                             <calculate field-name="parameters.availableToPromiseTotal" type="Double">
                                 <calcop operator="get" field-name="parameters.availableToPromiseTotal"/>
                                 <calcop operator="get" field-name="inventoryItem.availableToPromiseTotal"/>
@@ -678,7 +678,7 @@
         <set field="quantityOnHandTotal" value="0" type="Double"/>
         <set from-field="parameters.productId" field="lookupMktgPkgParams.productId"/>
         <entity-one entity-name="Product" value-name="product"/>
-        <if-compare field-name="product.productTypeId" operator="equals" value="MARKETING_PKG_AUTO">
+        <if-compare field="product.productTypeId" operator="equals" value="MARKETING_PKG_AUTO">
             <set value="MANUF_COMPONENT" field="lookupMktgPkgParams.type"/>
         <else>
             <set value="PRODUCT_COMPONENT" field="lookupMktgPkgParams.type"/>
@@ -689,7 +689,7 @@
         </call-service>
         <!-- if there are any components, then the ATP and QOH are based on the quantities of those component
             products and found with another service -->
-        <if-not-empty field-name="assocProducts">
+        <if-not-empty field="assocProducts">
             <set from-field="assocProducts" field="inventoryByAssocProductsParams.assocProducts"/>
             <set from-field="parameters.facilityId" field="inventoryByAssocProductsParams.facilityId"/>
             <set from-field="parameters.statusId" field="inventoryByAssocProductsParams.statusId"/>
@@ -734,7 +734,7 @@
                  for example, if we have a negative quantityOnHandTotal and quantityOnHandTotal equal to 
                  availableToPromiseTotal, then no reservations are present.
             -->
-            <if-compare-field field-name="item.quantityOnHandTotal" operator="not-equals" to-field-name="item.availableToPromiseTotal">
+            <if-compare-field field="item.quantityOnHandTotal" to-field="item.availableToPromiseTotal" operator="not-equals">
                 <get-related value-name="item" relation-name="OrderItemShipGrpInvRes" list-name="relatedRes"/>
                 <!--<list-to-list list-name="relatedRes" to-list-name="reservations"/>-->
 
@@ -753,13 +753,13 @@
                     <!-- only cancel/re-reserve when there are no picklists associated; this will prevent
                              orders appearing on duplicate pick lists -->
 
-                    <if-empty field-name="picklistItemList">
+                    <if-empty field="picklistItemList">
                         <log level="info" message="Order [${oneRelatedRes.orderId}] was not found on any picklist for InventoryItem [${oneRelatedRes.inventoryItemId}]"/>                                                                   
                         <if>
                             <condition>
                                 <and>
-                                    <if-compare-field field-name="parameters.priorityOrderId" operator="equals" to-field-name="oneRelatedRes.orderId"/>
-                                    <if-compare-field field-name="parameters.priorityOrderItemSeqId" operator="equals" to-field-name="oneRelatedRes.orderItemSeqId"/>
+                                    <if-compare-field field="parameters.priorityOrderId" to-field="oneRelatedRes.orderId" operator="equals"/>
+                                    <if-compare-field field="parameters.priorityOrderItemSeqId" to-field="oneRelatedRes.orderItemSeqId" operator="equals"/>
                                 </and>
                             </condition>
                             <then>
@@ -782,7 +782,7 @@
         <list-to-list list-name="privilegedReservations" to-list-name="allReservations"/>
         <list-to-list list-name="reservations" to-list-name="allReservations"/>
 
-        <if-compare field-name="inventoryItemTypeId" map-name="inventoryItem" operator="equals" value="SERIALIZED_INV_ITEM">
+        <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM">
             <!-- if the new item is serialized, i.e. qoh is 1, we just need the first reservation -->
             <first-from-list entry-name="inventoryReservation" list-name="allReservations"/>
             <clear-field field-name="allReservations"/>
@@ -802,8 +802,8 @@
         <!-- THEN, re-reserve the cancelled items -->
         <iterate list-name="allReservations" entry-name="oisgir">
             <!-- maintain a Set (in a Map) of orderIds that we have reallocated for, but only if they had some quantityNotReserved -->
-            <if-not-empty field-name="oisgir.quantityNotAvailable">
-                <if-compare field-name="oisgir.quantityNotAvailable" operator="greater" value="0" type="Double">
+            <if-not-empty field="oisgir.quantityNotAvailable">
+                <if-compare field="oisgir.quantityNotAvailable" operator="greater" value="0" type="Double">
                     <set field="touchedOrderIdMap.${oisgir.orderId}" value="Y"/>
                     <log level="verbose" message="Adding ${oisgir.orderId} to touchedOrderIdMap"/>
                 </if-compare>
@@ -821,7 +821,7 @@
             <set field="resMap.shipGroupSeqId" from-field="oisgir.shipGroupSeqId"/>
             <set field="resMap.sequenceId" from-field="oisgir.sequenceId"/>
             <log level="info" message="Re-reserving product [${resMap.productId}] for order item [${resMap.orderId}:${resMap.orderItemSeqId}] quantity [${resMap.quantity}]; facility [${inventoryItem.facilityId}]"/>
-            <if-empty field-name="inventoryItem.facilityId">
+            <if-empty field="inventoryItem.facilityId">
                 <log level="warning" message="In balanceInventoryItems there is no facilityId, so reserving from any facility for order item [${resMap.orderId}:${resMap.orderItemSeqId}]"></log>
                 <call-service service-name="reserveProductInventory" in-map-name="resMap"/>
                 
@@ -839,11 +839,11 @@
                 <result-to-field result-name="isBackOrder"/>
             </call-service>
             
-            <if-compare field-name="isBackOrder" operator="equals" value="false" type="Boolean">
+            <if-compare field="isBackOrder" operator="equals" value="false" type="Boolean">
                 <set field="noLongerOnBackOrderIdMap.${touchedOrderId}" value="Y"/>
             </if-compare>
         </iterate-map>
-        <if-not-empty field-name="noLongerOnBackOrderIdMap">
+        <if-not-empty field="noLongerOnBackOrderIdMap">
             <call-object-method obj-field-name="noLongerOnBackOrderIdMap" method-name="keySet" ret-field-name="noLongerOnBackOrderIdSet"/>
             <field-to-result field-name="noLongerOnBackOrderIdSet"/>
         </if-not-empty>
@@ -885,13 +885,13 @@
             <!-- only cancel/re-reserve when there are no picklists associated; this will prevent
                      orders appearing on duplicate pick lists -->
 
-            <if-empty field-name="picklistItemList">
+            <if-empty field="picklistItemList">
                 <log level="info" message="Order [${oneRelatedRes.orderId}] was not found on any picklist for InventoryItem [${oneRelatedRes.inventoryItemId}]"/>
                 <if>
                     <condition>
                         <and>
-                            <if-compare-field field-name="parameters.priorityOrderId" operator="equals" to-field-name="oneRelatedRes.orderId"/>
-                            <if-compare-field field-name="parameters.priorityOrderItemSeqId" operator="equals" to-field-name="oneRelatedRes.orderItemSeqId"/>
+                            <if-compare-field field="parameters.priorityOrderId" to-field="oneRelatedRes.orderId" operator="equals"/>
+                            <if-compare-field field="parameters.priorityOrderItemSeqId" to-field="oneRelatedRes.orderItemSeqId" operator="equals"/>
                         </and>
                     </condition>
                     <then>
@@ -920,8 +920,8 @@
         <!-- THEN, re-reserve the cancelled items -->
         <iterate list-name="allReservations" entry-name="oisgir">
             <!-- maintain a Set (in a Map) of orderIds that we have reallocated for, but only if they had some quantityNotReserved -->
-            <if-not-empty field-name="oisgir.quantityNotAvailable">
-                <if-compare field-name="oisgir.quantityNotAvailable" operator="greater" value="0" type="Double">
+            <if-not-empty field="oisgir.quantityNotAvailable">
+                <if-compare field="oisgir.quantityNotAvailable" operator="greater" value="0" type="Double">
                     <set field="touchedOrderIdMap.${oisgir.orderId}" value="Y"/>
                     <log level="verbose" message="Adding ${oisgir.orderId} to touchedOrderIdMap"/>
                 </if-compare>
@@ -950,11 +950,11 @@
                 <result-to-field result-name="isBackOrder"/>
             </call-service>
             
-            <if-compare field-name="isBackOrder" operator="equals" value="false" type="Boolean">
+            <if-compare field="isBackOrder" operator="equals" value="false" type="Boolean">
                 <set field="noLongerOnBackOrderIdMap.${touchedOrderId}" value="Y"/>
             </if-compare>
         </iterate-map>
-        <if-not-empty field-name="noLongerOnBackOrderIdMap">
+        <if-not-empty field="noLongerOnBackOrderIdMap">
             <call-object-method obj-field-name="noLongerOnBackOrderIdMap" method-name="keySet" ret-field-name="noLongerOnBackOrderIdSet"/>
             <field-to-result field-name="noLongerOnBackOrderIdSet"/>
         </if-not-empty>
@@ -963,7 +963,7 @@
     <simple-method method-name="balanceOrderItemsWithNegativeReservations" short-description="To balance order items with negative reservations">
         <entity-one entity-name="OrderHeader" value-name="orderHeader" auto-field-map="true"/>
         <get-related-one value-name="orderHeader" relation-name="ProductStore" to-value-name="productStore"/>
-        <if-compare field-name="productStore.balanceResOnOrderCreation" operator="equals" value="Y">
+        <if-compare field="productStore.balanceResOnOrderCreation" operator="equals" value="Y">
             <entity-condition entity-name="OrderItemAndShipGrpInvResAndItem" list-name="oisgirais">
                 <condition-list combine="and">
                     <condition-expr field-name="orderId" operator="equals" env-name="parameters.orderId"/>
@@ -979,7 +979,7 @@
             <iterate-map key-name="orderItemSeqId" value-name="oisgir" map-name="orderItems">
                 <set field="reassignInventoryReservationsCtx.productId" from-field="oisgir.productId"/>
                 <set field="reassignInventoryReservationsCtx.facilityId" from-field="oisgir.facilityId"/>
-                <if-not-empty field-name="oisgir.shipBeforeDate">
+                <if-not-empty field="oisgir.shipBeforeDate">
                     <set field="reassignInventoryReservationsCtx.fromDate" from-field="oisgir.shipBeforeDate"/>
                 <else>
                     <set field="reassignInventoryReservationsCtx.fromDate" from-field="nowTimestamp"/>
@@ -1008,14 +1008,14 @@
         <set from-field="parameters.inventoryTransferId" field="lookupPKMap.inventoryTransferId"/>
         <find-by-primary-key entity-name="InventoryTransfer" map-name="lookupPKMap" value-name="inventoryTransfer"/>
 
-        <if-not-empty field-name="parameters.statusId">
-            <if-compare-field field-name="parameters.statusId" operator="not-equals" to-field-name="inventoryTransfer.statusId">
+        <if-not-empty field="parameters.statusId">
+            <if-compare-field field="parameters.statusId" to-field="inventoryTransfer.statusId" operator="not-equals">
                 <!-- make sure a StatusValidChange record exists, if not return error -->
                 <entity-one entity-name="StatusValidChange" value-name="checkStatusValidChange" auto-field-map="false">
                     <field-map env-name="inventoryTransfer.statusId" field-name="statusId"/>
                     <field-map env-name="parameters.statusId" field-name="statusIdTo"/>
                 </entity-one>
-                <if-empty field-name="checkStatusValidChange">
+                <if-empty field="checkStatusValidChange">
                     <set value="ERROR: Changing the status from ${inventoryTransfer.statusId} to ${parameters.statusId} is not allowed." field="error_list[]"/>
                 </if-empty>
                 <check-errors/>
@@ -1037,26 +1037,26 @@
         <entity-one entity-name="Product" value-name="product"/>
         <entity-one entity-name="Facility" value-name="facility" use-cache="true"/>
         <get-related-one value-name="product" relation-name="ProductType" to-value-name="productType"/>
-        <if-compare field-name="productType.isPhysical" operator="equals" value="N">
+        <if-compare field="productType.isPhysical" operator="equals" value="N">
             <set field="quantityNotTransferred" value="0" type="Double"/>
             <else>
                 <!-- before we do the find, put together the orderBy list based on which reserveOrderEnumId is specified -->
                 <!-- FIFO=first in first out, so it should be order by ASCending receive or expire date
                      LIFO=last in first out, so it means order by DESCending receive or expire date
                      -->
-                <if-compare value="INVRO_GUNIT_COST" operator="equals" field-name="reserveOrderEnumId" map-name="parameters">
+                <if-compare value="INVRO_GUNIT_COST" operator="equals" field="parameters.reserveOrderEnumId">
                     <set value="unitCost DESC" field="orderByString"/>
                 <else>
-                    <if-compare value="INVRO_LUNIT_COST" operator="equals" field-name="reserveOrderEnumId" map-name="parameters">
+                    <if-compare value="INVRO_LUNIT_COST" operator="equals" field="parameters.reserveOrderEnumId">
                         <set value="+unitCost" field="orderByString"/>
                     <else>
-                        <if-compare value="INVRO_FIFO_EXP" operator="equals" field-name="reserveOrderEnumId" map-name="parameters">
+                        <if-compare value="INVRO_FIFO_EXP" operator="equals" field="parameters.reserveOrderEnumId">
                             <set value="+expireDate" field="orderByString"/>
                         <else>
-                            <if-compare value="INVRO_LIFO_EXP" operator="equals" field-name="reserveOrderEnumId" map-name="parameters">
+                            <if-compare value="INVRO_LIFO_EXP" operator="equals" field="parameters.reserveOrderEnumId">
                                 <set value="-expireDate" field="orderByString"/>
                             <else>
-                                <if-compare value="INVRO_LIFO_REC" operator="equals" field-name="reserveOrderEnumId" map-name="parameters">
+                                <if-compare value="INVRO_LIFO_REC" operator="equals" field="parameters.reserveOrderEnumId">
                                     <set value="-datetimeReceived" field="orderByString"/>
                                 <else>
                                     <!-- the default reserveOrderEnumId is INVRO_FIFO_REC, ie FIFO based on date received -->
@@ -1082,9 +1082,9 @@
                     <if>
                         <condition>
                             <and>
-                                <if-compare field-name="inventoryItemAndLocation.locationTypeEnumId" operator="equals" value="FLT_PICKLOC"/>
-                                <if-compare field-name="quantityNotTransferred" value="0.0" operator="greater" type="Double"/>
-                                <if-compare field-name="inventoryItemAndLocation.availableToPromiseTotal" value="0.0" operator="greater" type="Double"/>
+                                <if-compare field="inventoryItemAndLocation.locationTypeEnumId" operator="equals" value="FLT_PICKLOC"/>
+                                <if-compare field="quantityNotTransferred" value="0.0" operator="greater" type="Double"/>
+                                <if-compare field="inventoryItemAndLocation.availableToPromiseTotal" value="0.0" operator="greater" type="Double"/>
                             </and>
                         </condition>
                         <then>
@@ -1095,8 +1095,8 @@
                             <set field="inputMap.facilityIdTo" from-field="parameters.facilityIdTo"/>
                             <set field="inputMap.sendDate" from-field="parameters.sendDate"/>
                             <!-- TODO: inventory transfers for serialized items are not yet implemented -->
-                            <if-compare field-name="inventoryItemAndLocation.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
-                                <if-compare-field field-name="quantityNotTransferred" to-field-name="inventoryItemAndLocation.availableToPromiseTotal" operator="greater" type="Double">
+                            <if-compare field="inventoryItemAndLocation.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
+                                <if-compare-field field="quantityNotTransferred" to-field="inventoryItemAndLocation.availableToPromiseTotal" operator="greater" type="Double">
                                     <set field="inputMap.xferQty" from-field="inventoryItemAndLocation.availableToPromiseTotal"/>
                                 <else>
                                     <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
@@ -1114,15 +1114,15 @@
                 </iterate>
 
                 <!-- still some left? try the FLT_BULK locations -->
-                <if-compare field-name="quantityNotTransferred" operator="greater" value="0" type="Double">
+                <if-compare field="quantityNotTransferred" operator="greater" value="0" type="Double">
                     <find-by-and entity-name="InventoryItemAndLocation" map-name="lookupFieldMap" list-name="inventoryItemAndLocations" use-iterator="true" order-by-list-name="orderByList"/>
                     <iterate entry-name="inventoryItemAndLocation" list-name="inventoryItemAndLocations">
                         <if>
                             <condition>
                                 <and>
-                                    <if-compare field-name="inventoryItemAndLocation.locationTypeEnumId" operator="equals" value="FLT_BULK"/>
-                                    <if-compare field-name="quantityNotTransferred" value="0.0" operator="greater" type="Double"/>
-                                    <if-compare field-name="inventoryItemAndLocation.availableToPromiseTotal" value="0.0" operator="greater" type="Double"/>
+                                    <if-compare field="inventoryItemAndLocation.locationTypeEnumId" operator="equals" value="FLT_BULK"/>
+                                    <if-compare field="quantityNotTransferred" value="0.0" operator="greater" type="Double"/>
+                                    <if-compare field="inventoryItemAndLocation.availableToPromiseTotal" value="0.0" operator="greater" type="Double"/>
                                 </and>
                             </condition>
                             <then>
@@ -1133,8 +1133,8 @@
                                 <set field="inputMap.facilityIdTo" from-field="parameters.facilityIdTo"/>
                                 <set field="inputMap.sendDate" from-field="parameters.sendDate"/>
                                 <!-- TODO: inventory transfers for serialized items are not yet implemented -->
-                                <if-compare field-name="inventoryItemAndLocation.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
-                                    <if-compare-field field-name="quantityNotTransferred" to-field-name="inventoryItemAndLocation.availableToPromiseTotal" operator="greater" type="Double">
+                                <if-compare field="inventoryItemAndLocation.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
+                                    <if-compare-field field="quantityNotTransferred" to-field="inventoryItemAndLocation.availableToPromiseTotal" operator="greater" type="Double">
                                         <set field="inputMap.xferQty" from-field="inventoryItemAndLocation.availableToPromiseTotal"/>
                                     <else>
                                         <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
@@ -1153,15 +1153,15 @@
                 </if-compare>
 
                 <!-- last of all transfer InventoryItems that have no locationSeqId, ie are not in any particular location -->
-                <if-compare field-name="quantityNotTransferred" operator="greater" value="0" type="Double">
+                <if-compare field="quantityNotTransferred" operator="greater" value="0" type="Double">
                     <find-by-and entity-name="InventoryItem" map-name="lookupFieldMap" list-name="inventoryItems" use-iterator="true" order-by-list-name="orderByList"/>
                     <iterate entry-name="inventoryItem" list-name="inventoryItems">
                         <if>
                             <condition>
                                 <and>
-                                    <if-empty field-name="inventoryItem.locationSeqId"/>
-                                    <if-compare field-name="quantityNotTransferred" value="0.0" operator="greater" type="Double"/>
-                                    <if-compare field-name="inventoryItem.availableToPromiseTotal" value="0.0" operator="greater" type="Double"/>
+                                    <if-empty field="inventoryItem.locationSeqId"/>
+                                    <if-compare field="quantityNotTransferred" value="0.0" operator="greater" type="Double"/>
+                                    <if-compare field="inventoryItem.availableToPromiseTotal" value="0.0" operator="greater" type="Double"/>
                                 </and>
                             </condition>
                             <then>
@@ -1172,8 +1172,8 @@
                                 <set field="inputMap.facilityIdTo" from-field="parameters.facilityIdTo"/>
                                 <set field="inputMap.sendDate" from-field="parameters.sendDate"/>
                                 <!-- TODO: inventory transfers for serialized items are not yet implemented -->
-                                <if-compare field-name="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
-                                    <if-compare-field field-name="quantityNotTransferred" to-field-name="inventoryItem.availableToPromiseTotal" operator="greater" type="Double">
+                                <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
+                                    <if-compare-field field="quantityNotTransferred" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="Double">
                                         <set field="inputMap.xferQty" from-field="inventoryItem.availableToPromiseTotal"/>
                                     <else>
                                         <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
@@ -1258,7 +1258,7 @@
         </call-service>
         <assert>
             <not>
-                <if-empty field-name="physicalInventoryId">
+                <if-empty field="physicalInventoryId">
                     <log level="info" message="========physicalInventoryId ${physicalInventoryId} found null============================"/>
                 </if-empty>
             </not>

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml Fri Jun 13 23:03:12 2008
@@ -84,7 +84,7 @@
                     <field-map field-name="locationTypeEnumId" value="FLT_PICKLOC"/>
                 </entity-and>
 
-                <if-empty field-name="productFacilityLocationViewList">
+                <if-empty field="productFacilityLocationViewList">
                     <string-to-list string="Error in stock move, could not find a pick/primary location for facility [${parameters.facilityId}] and product [${productId}]" list-name="warningMessageList"/>
                 <else>
                     <!-- should generally only be one pick/primary location, just choose the first... -->
@@ -119,7 +119,7 @@
                     </iterate>
                     <set from-field="totalQuantityOnHand" field="moveInfo.quantityOnHandTotalFrom"/>
                     <set from-field="totalAvailableToPromise" field="moveInfo.availableToPromiseTotalFrom"/>
-                    <if-compare-field field-name="totalQuantityOnHand" operator="less" to-field-name="moveInfo.totalQuantity" type="Double">
+                    <if-compare-field field="totalQuantityOnHand" to-field="moveInfo.totalQuantity" operator="less" type="Double">
                         <!-- not enough on hand for move: add warning message, set moveInfo.totalQuantity to totalQuantityOnHand, and don't even bother looking for pre-emptive replenishment needs for this location right now -->
                         <string-to-list string="Warning in stock move: for facility [${parameters.facilityId}] and product [${productId}] going from location [${productFacilityLocation.locationSeqId}] to location [${moveInfo.targetProductFacilityLocation.locationSeqId}] a quantity of [${moveInfo.totalQuantity}] was needed but there are only [${totalQuantityOnHand}] on hand (this will be in the pick list with the full quantity on hand, but note that this will not be enough to prepare for all orders reserved against this location)" list-name="warningMessageList"/>
                         <set from-field="totalQuantityOnHand" field="moveInfo.totalQuantity"/>
@@ -144,8 +144,8 @@
                             now if there is enough left and there is less than the minimum for the
                             ProductFacilityLocation, move the restock quantity from ProductFacilityLocation
                         -->
-                        <if-compare-field field-name="targetTotalAvailableToPromise" operator="less" to-field-name="moveInfo.targetProductFacilityLocation.minimumStock" type="Double">
-                            <if-empty field-name="targetLocationSimpleMoveQuantity.${moveInfo.targetProductFacilityLocation.locationSeqId}">
+                        <if-compare-field field="targetTotalAvailableToPromise" to-field="moveInfo.targetProductFacilityLocation.minimumStock" operator="less" type="Double">
+                            <if-empty field="targetLocationSimpleMoveQuantity.${moveInfo.targetProductFacilityLocation.locationSeqId}">
                                 <!-- if targetTotalAvailableToPromise is less than productFacilityLocation.minimumStock, move over the moveInfo.targetProductFacilityLocation.moveQuantity -->
 
                                 <!-- if trying to move more from the location than is there, find the difference and put it in targetLocationSimpleMoveQuantity.${moveInfo.targetProductFacilityLocation.locationSeqId} -->
@@ -164,7 +164,7 @@
                                 </calculate>
                             </else>
                             </if-empty>
-                            <if-compare-field field-name="totalQuantityOnHand" operator="less" to-field-name="moveInfo.totalQuantity" type="Double">
+                            <if-compare-field field="totalQuantityOnHand" to-field="moveInfo.totalQuantity" operator="less" type="Double">
                                 <calculate field-name="targetLocationSimpleMoveQuantity.${moveInfo.targetProductFacilityLocation.locationSeqId}" type="Double">
                                     <calcop field-name="moveInfo.totalQuantity" operator="subtract"><calcop field-name="totalQuantityOnHand" operator="get"/></calcop>
                                 </calculate>
@@ -226,17 +226,17 @@
             <if>
                 <condition>
                     <and>
-                        <not><if-empty field-name="productFacilityLocationQuantityTest.moveQuantity"/></not>
-                        <if-compare field-name="productFacilityLocationQuantityTest.moveQuantity" operator="greater" value="0" type="Double"/>
+                        <not><if-empty field="productFacilityLocationQuantityTest.moveQuantity"/></not>
+                        <if-compare field="productFacilityLocationQuantityTest.moveQuantity" operator="greater" value="0" type="Double"/>
                         <or>
                             <and>
-                                <if-empty field-name="productFacilityLocationQuantityTest.availableToPromiseTotal"/>
-                                <not><if-empty field-name="productFacilityLocationQuantityTest.minimumStock"/></not>
-                                <if-compare field-name="productFacilityLocationQuantityTest.minimumStock" operator="greater" value="0" type="Double"></if-compare>
+                                <if-empty field="productFacilityLocationQuantityTest.availableToPromiseTotal"/>
+                                <not><if-empty field="productFacilityLocationQuantityTest.minimumStock"/></not>
+                                <if-compare field="productFacilityLocationQuantityTest.minimumStock" operator="greater" value="0" type="Double"></if-compare>
                             </and>
                             <and>
-                                <not><if-empty field-name="productFacilityLocationQuantityTest.availableToPromiseTotal"/></not>
-                                <if-compare-field field-name="productFacilityLocationQuantityTest.availableToPromiseTotal" operator="less" to-field-name="productFacilityLocationQuantityTest.minimumStock" type="Double"/>
+                                <not><if-empty field="productFacilityLocationQuantityTest.availableToPromiseTotal"/></not>
+                                <if-compare-field field="productFacilityLocationQuantityTest.availableToPromiseTotal" to-field="productFacilityLocationQuantityTest.minimumStock" operator="less" type="Double"/>
                             </and>
                         </or>
                     </and>
@@ -245,12 +245,12 @@
                     <if>
                         <condition>
                             <or>
-                                <if-empty field-name="stockMoveHandled.${productFacilityLocationQuantityTest.locationSeqId}"/>
-                                <if-compare field-name="stockMoveHandled.${productFacilityLocationQuantityTest.locationSeqId}" operator="not-equals" value="Y"/>
+                                <if-empty field="stockMoveHandled.${productFacilityLocationQuantityTest.locationSeqId}"/>
+                                <if-compare field="stockMoveHandled.${productFacilityLocationQuantityTest.locationSeqId}" operator="not-equals" value="Y"/>
                             </or>
                         </condition>
                         <then>
-                            <if-compare-field field-name="productFacilityLocationQuantityTest.productId" operator="not-equals" to-field-name="productSave.productId">
+                            <if-compare-field field="productFacilityLocationQuantityTest.productId" to-field="productSave.productId" operator="not-equals">
                                 <get-related-one value-name="productFacilityLocationQuantityTest" relation-name="Product" to-value-name="productSave"/>
                                  <clear-field field-name="fromLocationTotalAvailableToPromise"/>
                             </if-compare-field>
@@ -263,7 +263,7 @@
                                 <field-map field-name="locationTypeEnumId" value="FLT_BULK"/>
                             </entity-and>
 
-                            <if-empty field-name="inventoryItemAndLocationList">
+                            <if-empty field="inventoryItemAndLocationList">
                                 <string-to-list string="Error in stock move, could not find a bulk location for facility [${productFacilityLocationQuantityTest.facilityId}] and product [${productFacilityLocationQuantityTest.productId}]" list-name="warningMessageList"/>
                             <else>
                                 <set from-field="productFacilityLocationQuantityTest.moveQuantity" field="targetLocationMoveQuantity"/>
@@ -275,7 +275,7 @@
                                 <clear-field field-name="locationSeqId"/>
                                 <clear-field field-name="perLocationInventoryItemAndLocList"/>
                                 <iterate-map key-name="locationSeqId" value-name="perLocationInventoryItemAndLocList" map-name="InventoryItemAndLocationByLocMap">
-                                    <if-empty field-name="fromLocationTotalAvailableToPromise.${locationSeqId}">
+                                    <if-empty field="fromLocationTotalAvailableToPromise.${locationSeqId}">
                                         <calculate field-name="totalQuantityOnHand" type="Double"><number value="0"/></calculate>
                                         <calculate field-name="totalAvailableToPromise" type="Double"><number value="0"/></calculate>
                                         <iterate entry-name="inventoryItem" list-name="perLocationInventoryItemAndLocList">
@@ -294,8 +294,8 @@
                                     <if>
                                        <condition>
                                           <and>
-                                                <if-compare field-name="totalAvailableToPromise" operator="greater" value="0" type="Double"/>
-                                                <if-compare field-name="targetLocationMoveQuantity" operator="greater" value="0" type="Double"/>
+                                                <if-compare field="totalAvailableToPromise" operator="greater" value="0" type="Double"/>
+                                                <if-compare field="targetLocationMoveQuantity" operator="greater" value="0" type="Double"/>
                                           </and>
                                         </condition>
                                     <then>   
@@ -312,7 +312,7 @@
                                         <!--   see if there is enough left for the full amount in targetLocationMoveQuantity,
                                                  if not do whatever is available and put difference back in targetLocationMoveQuantity,
                                                  trying to move more from the location than is there, find the difference and put it in targetLocationMoveQuantity     -->
-                                        <if-compare-field field-name="totalAvailableToPromise" operator="less" to-field-name="targetLocationMoveQuantity" type="Double">
+                                        <if-compare-field field="totalAvailableToPromise" to-field="targetLocationMoveQuantity" operator="less" type="Double">
                                             <calculate field-name="targetLocationMoveQuantity" type="Double">
                                                 <calcop field-name="targetLocationMoveQuantity" operator="subtract"><calcop field-name="totalAvailableToPromise" operator="get"/></calcop>
                                             </calculate>
@@ -367,7 +367,7 @@
         <call-simple-method method-name="processOisgirMoveByStatusInline"/>
 
         <!-- Now for any remaining quantity, do a simple, ie non-OISGIR, stock move -->
-        <if-compare field-name="quantityLeftToProcess" operator="greater" value="0" type="Double">
+        <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="Double">
             <!-- find InventoryItems in the origin location with some availableToPromise to move -->
             <entity-and entity-name="InventoryItem" list-name="inventoryItemList">
                 <field-map field-name="productId" env-name="parameters.productId"/>
@@ -378,10 +378,10 @@
 
             <iterate entry-name="inventoryItem" list-name="inventoryItemList">
                 <!-- for each inventoryItem only process if quantityLeftToProcess > 0 and inventoryItem.availableToPromiseTotal > 0 -->
-                <if-compare field-name="quantityLeftToProcess" operator="greater" value="0" type="Double">
-                    <if-compare field-name="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="Double">
+                <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="Double">
+                    <if-compare field="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="Double">
                         <!-- set the currentQuantityToMove to the lower of these two values to ensure we don't move too much -->
-                        <if-compare-field field-name="quantityLeftToProcess" operator="greater" to-field-name="inventoryItem.availableToPromiseTotal" type="Double">
+                        <if-compare-field field="quantityLeftToProcess" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="Double">
                             <set from-field="inventoryItem.availableToPromiseTotal" field="currentQuantityToMove"/>
                         <else>
                             <set from-field="quantityLeftToProcess" field="currentQuantityToMove"/>
@@ -422,7 +422,7 @@
             </iterate>
         </if-compare>
 
-        <if-compare field-name="quantityLeftToProcess" operator="greater" value="0" type="Double">
+        <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="Double">
             <!-- this really isn't good, that means more was moved than we found to move, how did that happen? -->
             <string-to-list string="ERROR: Not enough available inventory found in location [${parameters.locationSeqId}] in facility [${parameters.facilityId}], did not reallocate ${quantityLeftToProcess} of the ${parameters.quantityMoved} reported as physically moved." list-name="warningMessageList"/>
         </if-compare>
@@ -448,7 +448,7 @@
             <entity-one entity-name="InventoryItem" value-name="inventoryItem"/>
 
             <!-- if this is a serialized InventoryItem, then just update the location -->
-            <if-compare field-name="inventoryItem.inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM">
+            <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM">
                 <set from-field="parameters.targetLocationSeqId" field="inventoryItem.locationSeqId"/>
                 <store-value value-name="inventoryItem"/>
             </if-compare>
@@ -457,7 +457,7 @@
                 if this is a non-serialized InventoryItem, create a new targetInventoryItem in the
                 target location and start moving all OrderItemShipGrpInvRes over, plus min move quantity from ProductFacilityLocation
             -->
-            <if-compare field-name="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
+            <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
                 <!-- create a new InventoryItem for the targetInventoryItem -->
                 <make-value entity-name="InventoryItem" map-name="inventoryItem" value-name="targetInventoryItem"/>
                 <set from-field="parameters.targetLocationSeqId" field="targetInventoryItem.locationSeqId"/>
@@ -488,7 +488,7 @@
                          OISGIR (reservation), so we would have to split it up
                     -->
                     <clear-field field-name="reservedQuantityLeftOver"/>
-                    <if-compare-field field-name="quantityLeftToProcess" operator="less" to-field-name="orderItemShipGrpInvRes.quantity" type="Double">
+                    <if-compare-field field="quantityLeftToProcess" to-field="orderItemShipGrpInvRes.quantity" operator="less" type="Double">
                         <!-- the complicated part: can split up the OISGIR (reservation) into two parts, and then transfer the inventory, somewhat complicated... -->
                         <calculate field-name="reservedQuantityLeftOver" type="Double">
                             <calcop field-name="orderItemShipGrpInvRes.quantity" operator="get"/>
@@ -507,7 +507,7 @@
                     </if-compare-field>
                     
                     <!-- now make sure that the currentQuantityToMove we decided on is not greater than remainingQuantityOnHand... -->
-                    <if-compare-field field-name="currentQuantityToMove" operator="greater" to-field-name="remainingQuantityOnHand" type="Double">
+                    <if-compare-field field="currentQuantityToMove" to-field="remainingQuantityOnHand" operator="greater" type="Double">
                         <set from-field="remainingQuantityOnHand" field="currentQuantityToMove"/>
                     </if-compare-field>
                     
@@ -515,9 +515,9 @@
                     <if>
                         <condition>
                             <and>
-                                <not><if-empty field-name="orderItemShipGrpInvRes.quantityNotAvailable"/></not>
-                                <not><if-empty field-name="reservedQuantityLeftOver"/></not>
-                                <if-compare-field field-name="orderItemShipGrpInvRes.quantityNotAvailable" operator="greater" to-field-name="reservedQuantityLeftOver" type="Double"/>
+                                <not><if-empty field="orderItemShipGrpInvRes.quantityNotAvailable"/></not>
+                                <not><if-empty field="reservedQuantityLeftOver"/></not>
+                                <if-compare-field field="orderItemShipGrpInvRes.quantityNotAvailable" to-field="reservedQuantityLeftOver" operator="greater" type="Double"/>
                             </and>
                         </condition>
                         <then>
@@ -554,8 +554,8 @@
                         ProductFacilityLocation based pre-emptive move is done
                     -->
                     <!-- if the OISGIR has a quantityNotAvailable, move that over by adding it to the origin, and subtracting it from the target -->
-                    <if-not-empty field-name="orderItemShipGrpInvRes.quantityNotAvailable">
-                        <if-compare field-name="orderItemShipGrpInvRes.quantityNotAvailable" operator="greater" value="0" type="Double">
+                    <if-not-empty field="orderItemShipGrpInvRes.quantityNotAvailable">
+                        <if-compare field="orderItemShipGrpInvRes.quantityNotAvailable" operator="greater" value="0" type="Double">
                             <calculate field-name="createOisgirDetailMap.availableToPromiseDiff" type="Double">
                                 <calcop field-name="quantityNotAvailableToMove" operator="get"/>
                             </calculate>
@@ -570,7 +570,7 @@
 
                     <!-- create the new and remove or update the old OISGIRs -->
                     <create-value value-name="targetOrderItemShipGrpInvRes"/>
-                    <if-empty field-name="reservedQuantityLeftOver">
+                    <if-empty field="reservedQuantityLeftOver">
                         <remove-value value-name="orderItemShipGrpInvRes"/>
                     <else>
                         <calculate field-name="orderItemShipGrpInvRes.quantity" type="Double">
@@ -600,7 +600,7 @@
                     <!-- <log level="info" message="Just update targetInventoryItem from OISGIR [${targetInventoryItem}]"/> -->
                 </iterate>
                 
-                <if-compare field-name="haveSetIiDetail" operator="equals" value="N">
+                <if-compare field="haveSetIiDetail" operator="equals" value="N">
                     <log level="info" message="Did not end up finding an OISGIR that we could move inventory with, so removing targetInventoryItem: ${targetInventoryItem}"/>
                     <remove-value value-name="targetInventoryItem"/>
                 </if-compare>

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml Fri Jun 13 23:03:12 2008
@@ -34,7 +34,7 @@
 
         <now-timestamp-to-env env-name="nowTimestamp"/>
 
-        <if-empty field-name="fromDate" map-name="newEntity">
+        <if-empty field="newEntity.fromDate">
             <set field="newEntity.fromDate" from-field="nowTimestamp" />
         </if-empty>
         <field-to-result field-name="fromDate" map-name="newEntity"/>
@@ -115,7 +115,7 @@
         <check-errors/>
         <make-value entity-name="ProductPaymentMethodType" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <if-empty field-name="newEntity.fromDate"><now-timestamp-to-env env-name="newEntity.fromDate"/></if-empty>
+        <if-empty field="newEntity.fromDate"><now-timestamp-to-env env-name="newEntity.fromDate"/></if-empty>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <create-value value-name="newEntity"/>  
     </simple-method>   

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/CustomerDigitalDownloadServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/CustomerDigitalDownloadServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/CustomerDigitalDownloadServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/CustomerDigitalDownloadServices.xml Fri Jun 13 23:03:12 2008
@@ -58,7 +58,7 @@
         
         <!-- create association with ProductStore.digProdUploadCategoryId -->
         <entity-one entity-name="ProductStore" value-name="productStore"/>
-        <if-not-empty field-name="productStore.digProdUploadCategoryId">
+        <if-not-empty field="productStore.digProdUploadCategoryId">
             <make-value value-name="addProductToCategoryMap" entity-name="ProductCategoryMember"/>
             <set field="addProductToCategoryMap.productId" from-field="productId"/>
             <set field="addProductToCategoryMap.productCategoryId" from-field="productStore.digProdUploadCategoryId"/>
@@ -72,7 +72,7 @@
         <set field="parameters.partyId" from-field="userLogin.partyId"/>
         <entity-one entity-name="SupplierProduct" value-name="supplierProduct"/>
         
-        <if-empty field-name="supplierProduct">
+        <if-empty field="supplierProduct">
             <add-error><fail-message message="Cannot update this Product: you are not associated with it as the Supplier"/></add-error>
         </if-empty>
         <check-errors/>
@@ -81,8 +81,8 @@
         <if>
             <condition>
                 <or>
-                    <not><if-empty field-name="parameters.productName"></if-empty></not>
-                    <not><if-empty field-name="parameters.description"></if-empty></not>
+                    <not><if-empty field="parameters.productName"></if-empty></not>
+                    <not><if-empty field="parameters.description"></if-empty></not>
                 </or>
             </condition>
             <then>
@@ -94,7 +94,7 @@
         </if>
 
         <!-- update price -->        
-        <if-not-empty field-name="parameters.price">
+        <if-not-empty field="parameters.price">
             <entity-and entity-name="ProductPrice" list-name="productPriceList">
                 <field-map field-name="productId" env-name="parameters.productId"/>
                 <field-map field-name="productPriceTypeId" value="DEFAULT_PRICE"/>
@@ -116,7 +116,7 @@
             <field-map field-name="partyId" env-name="userLogin.partyId"/>
         </entity-and>
         
-        <if-empty field-name="supplierProductList">
+        <if-empty field="supplierProductList">
             <add-error><fail-message message="Cannot update this Product: you are not associated with it as a Supplier"/></add-error>
         </if-empty>
         <check-errors/>
@@ -144,7 +144,7 @@
             <field-map field-name="productId" env-name="parameters.productId"/>
             <field-map field-name="partyId" env-name="userLogin.partyId"/>
         </entity-and>
-        <if-empty field-name="supplierProductList">
+        <if-empty field="supplierProductList">
             <add-error><fail-message message="Cannot update this Product: you are not associated with it as a Supplier"/></add-error>
         </if-empty>
         
@@ -154,7 +154,7 @@
             <field-map field-name="contentId" env-name="parameters.contentId"/>
             <field-map field-name="roleTypeId" value="OWNER"/>
         </entity-and>
-        <if-empty field-name="contentRoleList">
+        <if-empty field="contentRoleList">
             <add-error><fail-message message="Cannot add this Content: you are not associated with it as an Owner"/></add-error>
         </if-empty>
         
@@ -176,7 +176,7 @@
             <field-map field-name="partyId" env-name="userLogin.partyId"/>
         </entity-and>
         
-        <if-empty field-name="supplierProductList">
+        <if-empty field="supplierProductList">
             <add-error><fail-message message="Cannot update this Product: you are not associated with it as a Supplier"/></add-error>
         </if-empty>
         <check-errors/>

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductContentServices.xml Fri Jun 13 23:03:12 2008
@@ -26,7 +26,7 @@
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         
-        <if-empty field-name="fromDate" map-name="newEntity">
+        <if-empty field="newEntity.fromDate">
             <now-timestamp-to-env env-name="nowTimestamp"/>
             <set field="newEntity.fromDate" from-field="nowTimestamp" />
         </if-empty>