svn commit: r731851 [15/22] - in /ofbiz/trunk: applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/accounting/script/org/ofbiz/accounting/fixedasset/ applications/accounting/script/org/ofbiz/a...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r731851 [15/22] - in /ofbiz/trunk: applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/accounting/script/org/ofbiz/accounting/fixedasset/ applications/accounting/script/org/ofbiz/a...

jonesde
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Mon Jan  5 23:13:36 2009
@@ -41,7 +41,7 @@
         <entity-one entity-name="Facility" value-field="facility" use-cache="true"/>
         <get-related-one value-field="product" relation-name="ProductType" to-value-field="productType"/>
         <if-compare field="productType.isPhysical" operator="equals" value="N">
-            <set field="parameters.quantityNotReserved" value="0" type="Double"/>
+            <set field="parameters.quantityNotReserved" value="0" type="BigDecimal"/>
             <else>
                 <entity-one entity-name="OrderHeader" value-field="orderHeader"/>
 
@@ -94,13 +94,13 @@
                 <iterate entry="inventoryItemAndLocation" list="inventoryItemAndLocations">
                     <if-compare field="parameters.quantityNotReserved" operator="greater" value="0" type="Double">
                         <!-- this is a little trick to get the InventoryItem value object without doing a query, possible since all fields on InventoryItem are also on InventoryItemAndLocation with the same names -->
-                        <make-value entity-name="InventoryItem" map-name="inventoryItemAndLocation" value-field="inventoryItem"/>
+                        <make-value entity-name="InventoryItem" map="inventoryItemAndLocation" value-field="inventoryItem"/>
                         <call-simple-method method-name="reserveForInventoryItemInline"/>
                     </if-compare>
                 </iterate>
 
                 <!-- still some left? try the FLT_BULK locations -->
-                <if-compare field="parameters.quantityNotReserved" operator="greater" value="0" type="Double">
+                <if-compare field="parameters.quantityNotReserved" operator="greater" value="0" type="BigDecimal">
                     <entity-condition entity-name="InventoryItemAndLocation" list="inventoryItemAndLocations">
                         <condition-list combine="and">
                             <condition-expr field-name="productId" from-field="parameters.productId"/>
@@ -114,14 +114,14 @@
                     <iterate entry="inventoryItemAndLocation" list="inventoryItemAndLocations">
                         <if-compare field="parameters.quantityNotReserved" operator="greater" value="0" type="Double">
                             <!-- this is a little trick to get the InventoryItem value object without doing a query, possible since all fields on InventoryItem are also on InventoryItemAndLocation with the same names -->
-                            <make-value entity-name="InventoryItem" map-name="inventoryItemAndLocation" value-field="inventoryItem"/>
+                            <make-value entity-name="InventoryItem" map="inventoryItemAndLocation" value-field="inventoryItem"/>
                             <call-simple-method method-name="reserveForInventoryItemInline"/>
                         </if-compare>
                     </iterate>
                 </if-compare>
 
                 <!-- last of all try reserving in InventoryItems that have no locationSeqId, ie are not in any particular location -->
-                <if-compare field="parameters.quantityNotReserved" operator="greater" value="0" type="Double">
+                <if-compare field="parameters.quantityNotReserved" operator="greater" value="0" type="BigDecimal">
                     <entity-condition entity-name="InventoryItem" list="inventoryItems">
                         <condition-list combine="and">
                             <condition-expr field-name="productId" from-field="parameters.productId"/>
@@ -152,7 +152,7 @@
                         - subtract the remaining quantityNotReserved from the availableToPromise of the last non-serialized inventory item
                         - or if none was found create a non-ser InventoryItem with availableToPromise = -quantityNotReserved
                 -->
-                <if-compare field="parameters.quantityNotReserved" operator="not-equals" value="0" type="Double">
+                <if-compare field="parameters.quantityNotReserved" operator="not-equals" value="0" type="BigDecimal">
                     <if-compare field="parameters.requireInventory" operator="equals" value="Y">
                         <!-- use this else pattern to accomplish the anything but Y logic, ie if not specified default to inventory NOT required -->
                     <else>
@@ -163,7 +163,7 @@
                             <set from-field="parameters.orderId" field="createDetailMap.orderId"/>
                             <set from-field="parameters.orderItemSeqId" field="createDetailMap.orderItemSeqId"/>
                             <set from-field="parameters.shipGroupSeqId" field="createDetailMap.shipGroupSeqId"/>
-                            <calculate field="createDetailMap.availableToPromiseDiff" type="Double">
+                            <calculate field="createDetailMap.availableToPromiseDiff">
                                 <calcop field="parameters.quantityNotReserved" operator="negative"/>
                             </calculate>
                             <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
@@ -196,8 +196,8 @@
                             <set from-field="parameters.shipGroupSeqId" field="reserveOisgirMap.shipGroupSeqId"/>
                             <set from-field="lastNonSerInventoryItem.inventoryItemId" field="reserveOisgirMap.inventoryItemId"/>
                             <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
-                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantity"/>
-                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable"/>
+                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantity" type="BigDecimal"/>
+                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable" type="BigDecimal"/>
                             <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
                             <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
                             <set from-field="parameters.sequenceId" field="reserveOisgirMap.sequenceId"/>
@@ -228,7 +228,7 @@
                             <set from-field="parameters.orderId" field="createDetailMap.orderId"/>
                             <set from-field="parameters.orderItemSeqId" field="createDetailMap.orderItemSeqId"/>
                             <set from-field="parameters.shipGroupSeqId" field="createDetailMap.shipGroupSeqId"/>
-                            <calculate field="createDetailMap.availableToPromiseDiff" type="Double">
+                            <calculate field="createDetailMap.availableToPromiseDiff">
                                 <calcop field="parameters.quantityNotReserved" operator="negative"/>
                             </calculate>
                             <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
@@ -261,8 +261,8 @@
                             <set from-field="parameters.shipGroupSeqId" field="reserveOisgirMap.shipGroupSeqId"/>
                             <set from-field="newNonSerInventoryItem.inventoryItemId" field="reserveOisgirMap.inventoryItemId"/>
                             <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
-                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantity"/>
-                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable"/>
+                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantity" type="BigDecimal"/>
+                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable" type="BigDecimal"/>
                             <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
                             <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
                             <set from-field="parameters.sequenceId" field="reserveOisgirMap.sequenceId"/>
@@ -271,14 +271,14 @@
                         </else>
                         </if-not-empty>
 
-                        <set field="parameters.quantityNotReserved" value="0" type="Double"/>
+                        <set field="parameters.quantityNotReserved" value="0" type="BigDecimal"/>
                     </else>
                     </if-compare>
                 </if-compare>
             </else>
         </if-compare>
 
-        <field-to-result field="quantityNotReserved" map-name="parameters"/>
+        <field-to-result field="parameters.quantityNotReserved" result-name="quantityNotReserved"/>
     </simple-method>
     
     <simple-method method-name="reserveAnInventoryItem" short-description="Reserve a Specific Serialized InventoryItem">
@@ -295,8 +295,8 @@
           <set from-field="inventoryItem.inventoryItemId" field="createDetailMap.inventoryItemId"/>
           <set from-field="parameters.orderId" field="createDetailMap.orderId"/>
           <set from-field="parameters.orderItemSeqId" field="createDetailMap.orderItemSeqId"/>
-          <set field="createDetailMap.quantityOnHandDiff" value="-1" type="Double"/>
-          <set field="createDetailMap.availableToPromiseDiff" value="-1" type="Double"/>
+          <set field="createDetailMap.quantityOnHandDiff" value="-1" type="BigDecimal"/>
+          <set field="createDetailMap.availableToPromiseDiff" value="-1" type="BigDecimal"/>
           <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
         </if-compare>
         <set-service-fields map="parameters" to-map="cancelOrderItemShipGrpInvResMap" service-name="cancelOrderItemShipGrpInvRes"/>
@@ -316,7 +316,7 @@
             <set field="receiveCtx.productId" from-field="parameters.productId"/>
             <set field="receiveCtx.facilityId" from-field="facilityId"/>
             <set field="receiveCtx.quantityAccepted" from-field="parameters.quantity"/>
-            <set field="receiveCtx.quantityRejected" value="0" type="Double"/>
+            <set field="receiveCtx.quantityRejected" value="0" type="BigDecimal"/>
             <set field="receiveCtx.inventoryItemTypeId" value="SERIALIZED_INV_ITEM"/>
             <set field="receiveCtx.serialNumber" from-field="parameters.serialNumber"/>
             <call-service service-name="receiveInventoryProduct" in-map-name="receiveCtx">
@@ -343,7 +343,7 @@
             <set from-field="inventoryItemReservation.shipGroupSeqId" field="reserveOisgirMap.shipGroupSeqId"/>
             <set from-field="inventoryItemReservation.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
             <set from-field="inventoryItemReservation.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
-            <set field="reserveOisgirMap.quantity" value="1" type="Double"/>
+            <set field="reserveOisgirMap.quantity" value="1" type="BigDecimal"/>
             <set field="reserveOisgirMap.requireInventory" from-field="parameters.requireInventory"/>
             <if-not-empty field="inventoryItemReservation.sequenceId">
                 <set field="reserveOisgirMap.sequenceId" from-field="inventoryItemReservation.sequenceId"/>
@@ -365,19 +365,19 @@
         <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
         <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
         <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
-        <set field="reserveOisgirMap.quantity" value="1" type="Double"/>
+        <set field="reserveOisgirMap.quantity" value="1" type="BigDecimal"/>
         <if-not-empty field="parameters.sequenceId">
             <set field="reserveOisgirMap.sequenceId" from-field="parameters.sequenceId"/>
         </if-not-empty>        
         <!-- store OrderItemShipGrpInvRes record -->
         <call-service service-name="reserveOrderItemInventory" in-map-name="reserveOisgirMap"/>
         <clear-field field="reserveOisgirMap"/>        
-        <field-to-result field="inventoryItemId" map-name="inventoryItem"/>
+        <field-to-result field="inventoryItem.inventoryItemId" result-name="inventoryItemId"/>
     </simple-method>
 
     <simple-method method-name="reserveForInventoryItemInline" short-description="Does a reservation for one InventoryItem, meant to be called in-line">
         <!-- only do something with this inventoryItem if there is more inventory to reserve -->  
-        <if-compare field="parameters.quantityNotReserved" operator="greater" value="0" type="Double">
+        <if-compare field="parameters.quantityNotReserved" operator="greater" value="0" type="BigDecimal">
 
             <if-compare value="SERIALIZED_INV_ITEM" operator="equals" field="inventoryItem.inventoryItemTypeId">
                 <if-compare value="INV_AVAILABLE" operator="equals" field="inventoryItem.statusId">
@@ -394,7 +394,7 @@
                     <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
                     <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
                     <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
-                    <set field="reserveOisgirMap.quantity" value="1" type="Double"/>
+                    <set field="reserveOisgirMap.quantity" value="1" type="BigDecimal"/>
                     <if-not-empty field="parameters.sequenceId">
                         <set field="reserveOisgirMap.sequenceId" from-field="parameters.sequenceId"/>
                     </if-not-empty>
@@ -413,11 +413,11 @@
                         <and>
                             <if-empty field="inventoryItem.statusId"/>
                             <not><if-empty field="inventoryItem.availableToPromiseTotal"/></not>
-                            <if-compare field="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="Double"/>
+                            <if-compare field="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="BigDecimal"/>
                         </and>
                     </condition>
                     <then>
-                        <if-compare-field field="parameters.quantityNotReserved" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="Double">
+                        <if-compare-field field="parameters.quantityNotReserved" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="BigDecimal">
                             <set from-field="inventoryItem.availableToPromiseTotal" field="parameters.deductAmount"/>
                         <else>
                             <set from-field="parameters.quantityNotReserved" field="parameters.deductAmount"/>
@@ -428,7 +428,7 @@
                         <set from-field="inventoryItem.inventoryItemId" field="createDetailMap.inventoryItemId"/>
                         <set from-field="parameters.orderId" field="createDetailMap.orderId"/>
                         <set from-field="parameters.orderItemSeqId" field="createDetailMap.orderItemSeqId"/>
-                        <calculate field="createDetailMap.availableToPromiseDiff" type="Double">
+                        <calculate field="createDetailMap.availableToPromiseDiff">
                             <calcop field="parameters.deductAmount" operator="negative"/>
                         </calculate>
                         <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
@@ -442,7 +442,7 @@
                         <set from-field="inventoryItem.inventoryItemId" field="reserveOisgirMap.inventoryItemId"/>
                         <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
                         <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
-                        <set from-field="parameters.deductAmount" field="reserveOisgirMap.quantity"/>
+                        <set from-field="parameters.deductAmount" field="reserveOisgirMap.quantity" type="BigDecimal"/>
                         <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
                         <if-not-empty field="parameters.sequenceId">
                             <set field="reserveOisgirMap.sequenceId" from-field="parameters.sequenceId"/>
@@ -450,9 +450,9 @@
                         <call-service service-name="reserveOrderItemInventory" in-map-name="reserveOisgirMap"/>
                         <clear-field field="reserveOisgirMap"/>
 
-                        <calculate field="quantityNotReserved" map-name="parameters">
-                            <calcop operator="subtract" field="quantityNotReserved" map-name="parameters">
-                                <calcop operator="get" field="deductAmount" map-name="parameters"/>
+                        <calculate field="parameters.quantityNotReserved">
+                            <calcop operator="subtract" field="parameters.quantityNotReserved">
+                                <calcop operator="get" field="parameters.deductAmount"/>
                             </calcop>
                         </calculate>
                     </then>
@@ -564,11 +564,11 @@
             <set from-field="parameters.shipGroupSeqId" field="oisgirListLookupMap.shipGroupSeqId"/>
             <find-by-and entity-name="OrderItemShipGrpInvRes" map="oisgirListLookupMap" list="oisgirList" use-cache="false"/>
             <iterate entry="oisgir" list="oisgirList">
-                <if-compare field="toCancelAmount" operator="greater" value="0" type="Double">
-                    <if-compare-field field="oisgir.quantity" to-field="toCancelAmount" operator="greater-equals" type="Double">
+                <if-compare field="toCancelAmount" operator="greater" value="0" type="BigDecimal">
+                    <if-compare-field field="oisgir.quantity" to-field="toCancelAmount" operator="greater-equals" type="BigDecimal">
                         <set from-field="toCancelAmount" field="cancelOisgirMap.cancelQuantity"/>
                     </if-compare-field>
-                    <if-compare-field field="oisgir.quantity" to-field="toCancelAmount" operator="less" type="Double">
+                    <if-compare-field field="oisgir.quantity" to-field="toCancelAmount" operator="less" type="BigDecimal">
                         <set from-field="oisgir.quantity" field="cancelOisgirMap.cancelQuantity"/>
                     </if-compare-field>
 
@@ -615,7 +615,7 @@
             <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
             <clear-field field="createDetailMap"/>
 
-            <if-compare-field field="cancelQuantity" to-field="orderItemShipGrpInvRes.quantity" operator="less" type="Double">
+            <if-compare-field field="cancelQuantity" to-field="orderItemShipGrpInvRes.quantity" operator="less" type="BigDecimal">
                 <calculate field="orderItemShipGrpInvRes.quantity">
                     <calcop operator="subtract" field="orderItemShipGrpInvRes.quantity">
                         <calcop operator="get" field="cancelQuantity"/>

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=731851&r1=731850&r2=731851&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 Mon Jan  5 23:13:36 2009
@@ -211,7 +211,7 @@
         <!-- if you don't want inventory item with unitCost = 0, change the operator
              attribute from "less" to "less-equals".
         -->
-        <if-compare field="inventoryItem.unitCost" operator="less" value="0" type="Double">
+        <if-compare field="inventoryItem.unitCost" operator="less" value="0" type="BigDecimal">
             <add-error>
                 <fail-message message="Error: you cannot create inventory items with a negative unitCost."/>
             </add-error>
@@ -235,7 +235,7 @@
         <field-to-result field="lookedUpValue.statusId" result-name="oldStatusId"/>
         <!-- special handling for the unitCost -->
         <if-not-empty field="parameters.unitCost">
-            <if-compare field="parameters.unitCost" operator="less" value="0.0" type="Double">
+            <if-compare field="parameters.unitCost" operator="less" value="0.0" type="BigDecimal">
                 <add-error><fail-message message="Unit cost for inventory item [${lookupPKMap.inventoryItemId}] cannot be negative."/></add-error>
                 <check-errors/>
             </if-compare>
@@ -301,8 +301,8 @@
         </if-not-empty>
 
         <!-- if availableToPromiseDiff or quantityOnHandDiff are empty set to 0 -->
-        <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>
+        <if-empty field="newEntity.availableToPromiseDiff"><set field="newEntity.availableToPromiseDiff" value="0" type="BigDecimal"/></if-empty>
+        <if-empty field="newEntity.quantityOnHandDiff"><set field="newEntity.quantityOnHandDiff" value="0" type="BigDecimal"/></if-empty>
 
         <create-value value-field="newEntity"/>
     </simple-method>
@@ -324,14 +324,14 @@
                     <and>
                         <if-compare field="inventoryItem.statusId" value="INV_AVAILABLE" operator="equals"/>
                         <or>
-                            <if-compare field="inventoryItem.availableToPromiseTotal" operator="not-equals" value="1" type="Double"/>
-                            <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="1" type="Double"/>
+                            <if-compare field="inventoryItem.availableToPromiseTotal" operator="not-equals" value="1" type="BigDecimal"/>
+                            <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="1" type="BigDecimal"/>
                         </or>
                     </and>
                 </condition>
                 <then>
-                    <set field="inventoryItem.availableToPromiseTotal" value="1" type="Double"/>
-                    <set field="inventoryItem.quantityOnHandTotal" value="1" type="Double"/>
+                    <set field="inventoryItem.availableToPromiseTotal" value="1" type="BigDecimal"/>
+                    <set field="inventoryItem.quantityOnHandTotal" value="1" type="BigDecimal"/>
                     <log level="always" message="In updateSerializedInventoryTotals Storing totals for item [${inventoryItem.inventoryItemId}] INV_AVAIABLE [1/1]"/>
                     <store-value value-field="inventoryItem"/>
                 </then>
@@ -342,14 +342,14 @@
                         <and>
                             <if-compare field="inventoryItem.statusId" value="INV_DELIVERED" operator="equals"/>
                             <or>
-                                <if-compare field="inventoryItem.availableToPromiseTotal" operator="not-equals" value="0" type="Double"/>
-                                <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="0" type="Double"/>
+                                <if-compare field="inventoryItem.availableToPromiseTotal" operator="not-equals" value="0" type="BigDecimal"/>
+                                <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="0" type="BigDecimal"/>
                             </or>
                         </and>
                     </condition>
                     <then>
-                        <set field="inventoryItem.availableToPromiseTotal" value="0" type="Double"/>
-                        <set field="inventoryItem.quantityOnHandTotal" value="0" type="Double"/>
+                        <set field="inventoryItem.availableToPromiseTotal" value="0" type="BigDecimal"/>
+                        <set field="inventoryItem.quantityOnHandTotal" value="0" type="BigDecimal"/>
                         <log level="always" message="In updateSerializedInventoryTotals Storing totals [${inventoryItem.inventoryItemId}] for INV_DELIVERED [0/0]"/>
                         <store-value value-field="inventoryItem"/>
                     </then>
@@ -362,14 +362,14 @@
                             <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="inventoryItem.availableToPromiseTotal" operator="not-equals" value="0" type="Double"/>
-                                <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="1" type="Double"/>
+                                <if-compare field="inventoryItem.availableToPromiseTotal" operator="not-equals" value="0" type="BigDecimal"/>
+                                <if-compare field="inventoryItem.quantityOnHandTotal" operator="not-equals" value="1" type="BigDecimal"/>
                             </or>
                         </and>
                     </condition>
                     <then>
-                        <set field="inventoryItem.availableToPromiseTotal" value="0" type="Double"/>
-                        <set field="inventoryItem.quantityOnHandTotal" value="1" type="Double"/>
+                        <set field="inventoryItem.availableToPromiseTotal" value="0" type="BigDecimal"/>
+                        <set field="inventoryItem.quantityOnHandTotal" value="1" type="BigDecimal"/>
                         <log level="always" message="In updateSerializedInventoryTotals Storing totals [${inventoryItem.inventoryItemId}] for other status [0/1]"/>
                         <store-value value-field="inventoryItem"/>
                     </then>
@@ -442,7 +442,7 @@
                 <call-service service-name="getProductInventoryAvailable" in-map-name="productIdMap">
                     <result-to-field result-name="availableToPromiseTotal"/>
                 </call-service>
-                <if-compare field="availableToPromiseTotal" operator="less-equals" value="0" type="Double">
+                <if-compare field="availableToPromiseTotal" operator="less-equals" value="0" type="BigDecimal">
                     <set from-field="parameters.productId" field="discontinueProductSalesMap.productId"/>
                     <call-service service-name="discontinueProductSales" in-map-name="discontinueProductSalesMap"/>
                 </if-compare>
@@ -613,8 +613,8 @@
             </else>
         </if-compare>
         
-        <set field="parameters.availableToPromiseTotal" value="0" type="Double"/>
-        <set field="parameters.quantityOnHandTotal" value="0" type="Double"/>
+        <set field="parameters.availableToPromiseTotal" value="0" type="BigDecimal"/>
+        <set field="parameters.quantityOnHandTotal" value="0" type="BigDecimal"/>
         <iterate entry="inventoryItem" list="inventoryItems">
             <if-compare field="inventoryItem.inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM">
                 <if>
@@ -626,13 +626,13 @@
                         </or>
                     </condition>
                     <then>
-                        <calculate field="parameters.quantityOnHandTotal" type="Double">
+                        <calculate field="parameters.quantityOnHandTotal" type="BigDecimal">
                             <calcop field="parameters.quantityOnHandTotal" operator="add"><number value="1.0"/></calcop>
                         </calculate>
                     </then>
                 </if>
                 <if-compare value="INV_AVAILABLE" operator="equals" field="inventoryItem.statusId">
-                    <calculate field="parameters.availableToPromiseTotal" type="Double">
+                    <calculate field="parameters.availableToPromiseTotal" type="BigDecimal">
                         <calcop field="parameters.availableToPromiseTotal" operator="add"><number value="1.0"/></calcop>
                     </calculate>
                 </if-compare>
@@ -656,13 +656,13 @@
                     </condition>
                     <then>
                         <if-not-empty field="inventoryItem.quantityOnHandTotal">
-                            <calculate field="parameters.quantityOnHandTotal" type="Double">
+                            <calculate field="parameters.quantityOnHandTotal" type="BigDecimal">
                                 <calcop operator="get" field="parameters.quantityOnHandTotal"/>
                                 <calcop operator="get" field="inventoryItem.quantityOnHandTotal"/>
                             </calculate>
                         </if-not-empty>
                         <if-not-empty field="inventoryItem.availableToPromiseTotal">
-                            <calculate field="parameters.availableToPromiseTotal" type="Double">
+                            <calculate field="parameters.availableToPromiseTotal" type="BigDecimal">
                                 <calcop operator="get" field="parameters.availableToPromiseTotal"/>
                                 <calcop operator="get" field="inventoryItem.availableToPromiseTotal"/>
                             </calculate>
@@ -672,13 +672,13 @@
             </if-compare>
         </iterate>
 
-        <field-to-result field="availableToPromiseTotal" map-name="parameters"/>
-        <field-to-result field="quantityOnHandTotal" map-name="parameters"/>
+        <field-to-result field="parameters.availableToPromiseTotal" result-name="availableToPromiseTotal"/>
+        <field-to-result field="parameters.quantityOnHandTotal" result-name="quantityOnHandTotal"/>
     </simple-method>
 
     <simple-method method-name="getMktgPackagesAvailable" short-description="Get Marketing Packages Available From Components In Inventory" login-required="false" use-transaction="false">
-        <set field="availableToPromiseTotal" value="0" type="Double"/>
-        <set field="quantityOnHandTotal" value="0" type="Double"/>
+        <set field="availableToPromiseTotal" value="0" type="BigDecimal"/>
+        <set field="quantityOnHandTotal" value="0" type="BigDecimal"/>
         <set from-field="parameters.productId" field="lookupMktgPkgParams.productId"/>
         <entity-one entity-name="Product" value-field="product"/>
         <if-compare field="product.productTypeId" operator="equals" value="MARKETING_PKG_AUTO">
@@ -801,7 +801,7 @@
         <iterate list="allReservations" entry="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="oisgir.quantityNotAvailable">
-                <if-compare field="oisgir.quantityNotAvailable" operator="greater" value="0" type="Double">
+                <if-compare field="oisgir.quantityNotAvailable" operator="greater" value="0" type="BigDecimal">
                     <set field="touchedOrderIdMap.${oisgir.orderId}" value="Y"/>
                     <log level="verbose" message="Adding ${oisgir.orderId} to touchedOrderIdMap"/>
                 </if-compare>
@@ -910,7 +910,7 @@
         <iterate list="allReservations" entry="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="oisgir.quantityNotAvailable">
-                <if-compare field="oisgir.quantityNotAvailable" operator="greater" value="0" type="Double">
+                <if-compare field="oisgir.quantityNotAvailable" operator="greater" value="0" type="BigDecimal">
                     <set field="touchedOrderIdMap.${oisgir.orderId}" value="Y"/>
                     <log level="verbose" message="Adding ${oisgir.orderId} to touchedOrderIdMap"/>
                 </if-compare>
@@ -1027,7 +1027,7 @@
         <entity-one entity-name="Facility" value-field="facility" use-cache="true"/>
         <get-related-one value-field="product" relation-name="ProductType" to-value-field="productType"/>
         <if-compare field="productType.isPhysical" operator="equals" value="N">
-            <set field="quantityNotTransferred" value="0" type="Double"/>
+            <set field="quantityNotTransferred" value="0" type="BigDecimal"/>
             <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
@@ -1072,8 +1072,8 @@
                         <condition>
                             <and>
                                 <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"/>
+                                <if-compare field="quantityNotTransferred" value="0.0" operator="greater" type="BigDecimal"/>
+                                <if-compare field="inventoryItemAndLocation.availableToPromiseTotal" value="0.0" operator="greater" type="BigDecimal"/>
                             </and>
                         </condition>
                         <then>
@@ -1085,7 +1085,7 @@
                             <set field="inputMap.sendDate" from-field="parameters.sendDate"/>
                             <!-- TODO: inventory transfers for serialized items are not yet implemented -->
                             <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">
+                                <if-compare-field field="quantityNotTransferred" to-field="inventoryItemAndLocation.availableToPromiseTotal" operator="greater" type="BigDecimal">
                                     <set field="inputMap.xferQty" from-field="inventoryItemAndLocation.availableToPromiseTotal"/>
                                 <else>
                                     <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
@@ -1103,15 +1103,15 @@
                 </iterate>
 
                 <!-- still some left? try the FLT_BULK locations -->
-                <if-compare field="quantityNotTransferred" operator="greater" value="0" type="Double">
+                <if-compare field="quantityNotTransferred" operator="greater" value="0" type="BigDecimal">
                     <find-by-and entity-name="InventoryItemAndLocation" map="lookupFieldMap" list="inventoryItemAndLocations" use-iterator="true" order-by-list="orderByList"/>
                     <iterate entry="inventoryItemAndLocation" list="inventoryItemAndLocations">
                         <if>
                             <condition>
                                 <and>
                                     <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"/>
+                                    <if-compare field="quantityNotTransferred" value="0.0" operator="greater" type="BigDecimal"/>
+                                    <if-compare field="inventoryItemAndLocation.availableToPromiseTotal" value="0.0" operator="greater" type="BigDecimal"/>
                                 </and>
                             </condition>
                             <then>
@@ -1123,7 +1123,7 @@
                                 <set field="inputMap.sendDate" from-field="parameters.sendDate"/>
                                 <!-- TODO: inventory transfers for serialized items are not yet implemented -->
                                 <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">
+                                    <if-compare-field field="quantityNotTransferred" to-field="inventoryItemAndLocation.availableToPromiseTotal" operator="greater" type="BigDecimal">
                                         <set field="inputMap.xferQty" from-field="inventoryItemAndLocation.availableToPromiseTotal"/>
                                     <else>
                                         <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
@@ -1142,15 +1142,15 @@
                 </if-compare>
 
                 <!-- last of all transfer InventoryItems that have no locationSeqId, ie are not in any particular location -->
-                <if-compare field="quantityNotTransferred" operator="greater" value="0" type="Double">
+                <if-compare field="quantityNotTransferred" operator="greater" value="0" type="BigDecimal">
                     <find-by-and entity-name="InventoryItem" map="lookupFieldMap" list="inventoryItems" use-iterator="true" order-by-list="orderByList"/>
                     <iterate entry="inventoryItem" list="inventoryItems">
                         <if>
                             <condition>
                                 <and>
                                     <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"/>
+                                    <if-compare field="quantityNotTransferred" value="0.0" operator="greater" type="BigDecimal"/>
+                                    <if-compare field="inventoryItem.availableToPromiseTotal" value="0.0" operator="greater" type="BigDecimal"/>
                                 </and>
                             </condition>
                             <then>
@@ -1162,7 +1162,7 @@
                                 <set field="inputMap.sendDate" from-field="parameters.sendDate"/>
                                 <!-- TODO: inventory transfers for serialized items are not yet implemented -->
                                 <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">
+                                    <if-compare-field field="quantityNotTransferred" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="BigDecimal">
                                         <set field="inputMap.xferQty" from-field="inventoryItem.availableToPromiseTotal"/>
                                     <else>
                                         <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>

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=731851&r1=731850&r2=731851&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 Mon Jan  5 23:13:36 2009
@@ -93,9 +93,9 @@
                     <get-related-one value-field="productFacilityLocationView" relation-name="ProductFacilityLocation" to-value-field="moveInfo.targetProductFacilityLocation"/>
 
                     <!-- get totalQuantity: iterate through perProductOiirailList and add up quantity (from OrderItemShipGrpInvRes) -->
-                    <calculate field="moveInfo.totalQuantity" type="Double"><number value="0"/></calculate>
+                    <calculate field="moveInfo.totalQuantity"><number value="0"/></calculate>
                     <iterate entry="perProductOiirail" list="perProductOiirailList">
-                        <calculate field="moveInfo.totalQuantity" type="Double">
+                        <calculate field="moveInfo.totalQuantity">
                             <calcop field="moveInfo.totalQuantity" operator="add"><calcop field="perProductOiirail.quantity" operator="get"/></calcop>
                         </calculate>
                     </iterate>
@@ -107,19 +107,21 @@
                         <field-map field-name="locationSeqId" from-field="locationSeqId"/>
                     </entity-and>
 
-                    <calculate field="totalQuantityOnHand" type="Double"><number value="0"/></calculate>
-                    <calculate field="totalAvailableToPromise" type="Double"><number value="0"/></calculate>
+                    <calculate field="totalQuantityOnHand"><number value="0"/></calculate>
+                    <calculate field="totalAvailableToPromise"><number value="0"/></calculate>
                     <iterate entry="inventoryItem" list="inventoryItemList">
-                        <calculate field="totalQuantityOnHand" type="Double">
-                            <calcop field="totalQuantityOnHand" operator="add"><calcop field="inventoryItem.quantityOnHandTotal" operator="get"/></calcop>
+                        <calculate field="totalQuantityOnHand">
+                            <calcop field="totalQuantityOnHand" operator="get"/>
+                            <calcop field="inventoryItem.quantityOnHandTotal" operator="get"/>
                         </calculate>
-                        <calculate field="totalAvailableToPromise" type="Double">
-                            <calcop field="totalAvailableToPromise" operator="add"><calcop field="inventoryItem.availableToPromiseTotal" operator="get"/></calcop>
+                        <calculate field="totalAvailableToPromise">
+                            <calcop field="totalAvailableToPromise" operator="get"/>
+                            <calcop field="inventoryItem.availableToPromiseTotal" operator="get"/>
                         </calculate>
                     </iterate>
                     <set from-field="totalQuantityOnHand" field="moveInfo.quantityOnHandTotalFrom"/>
                     <set from-field="totalAvailableToPromise" field="moveInfo.availableToPromiseTotalFrom"/>
-                    <if-compare-field field="totalQuantityOnHand" to-field="moveInfo.totalQuantity" operator="less" type="Double">
+                    <if-compare-field field="totalQuantityOnHand" to-field="moveInfo.totalQuantity" operator="less" type="BigDecimal">
                         <!-- 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="warningMessageList"/>
                         <set from-field="totalQuantityOnHand" field="moveInfo.totalQuantity"/>
@@ -128,13 +130,13 @@
 
                         <!-- get all InventoryItems and total the availableToPromise (and quantityOnHand) for the target location -->
                         <get-related value-field="moveInfo.targetProductFacilityLocation" relation-name="InventoryItem" list="targetInventoryItemList"/>
-                        <calculate field="targetTotalAvailableToPromise" type="Double"><number value="0"/></calculate>
-                        <calculate field="targetTotalQuantityOnHand" type="Double"><number value="0"/></calculate>
+                        <calculate field="targetTotalAvailableToPromise"><number value="0"/></calculate>
+                        <calculate field="targetTotalQuantityOnHand"><number value="0"/></calculate>
                         <iterate entry="inventoryItem" list="targetInventoryItemList">
-                            <calculate field="targetTotalAvailableToPromise" type="Double">
+                            <calculate field="targetTotalAvailableToPromise">
                                 <calcop field="targetTotalAvailableToPromise" operator="add"><calcop field="inventoryItem.availableToPromiseTotal" operator="get"/></calcop>
                             </calculate>
-                            <calculate field="targetTotalQuantityOnHand" type="Double">
+                            <calculate field="targetTotalQuantityOnHand">
                                 <calcop field="targetTotalQuantityOnHand" operator="add"><calcop field="inventoryItem.quantityOnHandTotal" operator="get"/></calcop>
                             </calculate>
                         </iterate>
@@ -144,12 +146,12 @@
                             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="targetTotalAvailableToPromise" to-field="moveInfo.targetProductFacilityLocation.minimumStock" operator="less" type="Double">
+                        <if-compare-field field="targetTotalAvailableToPromise" to-field="moveInfo.targetProductFacilityLocation.minimumStock" operator="less" type="BigDecimal">
                             <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} -->
-                                <calculate field="moveInfo.totalQuantity" type="Double">
+                                <calculate field="moveInfo.totalQuantity">
                                     <calcop field="moveInfo.totalQuantity" operator="add"><calcop field="moveInfo.targetProductFacilityLocation.moveQuantity" operator="get"/></calcop>
                                 </calculate>
                             <else>
@@ -159,13 +161,13 @@
                                     if not do whatever is available and put difference back in
                                     targetLocationSimpleMoveQuantity.${moveInfo.targetProductFacilityLocation.locationSeqId}
                                 -->
-                                <calculate field="moveInfo.totalQuantity" type="Double">
+                                <calculate field="moveInfo.totalQuantity">
                                     <calcop field="moveInfo.totalQuantity" operator="add"><calcop field="targetLocationSimpleMoveQuantity.${moveInfo.targetProductFacilityLocation.locationSeqId}" operator="get"/></calcop>
                                 </calculate>
                             </else>
                             </if-empty>
-                            <if-compare-field field="totalQuantityOnHand" to-field="moveInfo.totalQuantity" operator="less" type="Double">
-                                <calculate field="targetLocationSimpleMoveQuantity.${moveInfo.targetProductFacilityLocation.locationSeqId}" type="Double">
+                            <if-compare-field field="totalQuantityOnHand" to-field="moveInfo.totalQuantity" operator="less" type="BigDecimal">
+                                <calculate field="targetLocationSimpleMoveQuantity.${moveInfo.targetProductFacilityLocation.locationSeqId}">
                                     <calcop field="moveInfo.totalQuantity" operator="subtract"><calcop field="totalQuantityOnHand" operator="get"/></calcop>
                                 </calculate>
                                 <set from-field="totalQuantityOnHand" field="moveInfo.totalQuantity"/>
@@ -227,16 +229,16 @@
                 <condition>
                     <and>
                         <not><if-empty field="productFacilityLocationQuantityTest.moveQuantity"/></not>
-                        <if-compare field="productFacilityLocationQuantityTest.moveQuantity" operator="greater" value="0" type="Double"/>
+                        <if-compare field="productFacilityLocationQuantityTest.moveQuantity" operator="greater" value="0" type="BigDecimal"/>
                         <or>
                             <and>
                                 <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>
+                                <if-compare field="productFacilityLocationQuantityTest.minimumStock" operator="greater" value="0" type="BigDecimal"></if-compare>
                             </and>
                             <and>
                                 <not><if-empty field="productFacilityLocationQuantityTest.availableToPromiseTotal"/></not>
-                                <if-compare-field field="productFacilityLocationQuantityTest.availableToPromiseTotal" to-field="productFacilityLocationQuantityTest.minimumStock" operator="less" type="Double"/>
+                                <if-compare-field field="productFacilityLocationQuantityTest.availableToPromiseTotal" to-field="productFacilityLocationQuantityTest.minimumStock" operator="less" type="BigDecimal"/>
                             </and>
                         </or>
                     </and>
@@ -276,13 +278,13 @@
                                 <clear-field field="perLocationInventoryItemAndLocList"/>
                                 <iterate-map key="locationSeqId" value="perLocationInventoryItemAndLocList" map="InventoryItemAndLocationByLocMap">
                                     <if-empty field="fromLocationTotalAvailableToPromise.${locationSeqId}">
-                                        <calculate field="totalQuantityOnHand" type="Double"><number value="0"/></calculate>
-                                        <calculate field="totalAvailableToPromise" type="Double"><number value="0"/></calculate>
+                                        <calculate field="totalQuantityOnHand"><number value="0"/></calculate>
+                                        <calculate field="totalAvailableToPromise"><number value="0"/></calculate>
                                         <iterate entry="inventoryItem" list="perLocationInventoryItemAndLocList">
-                                            <calculate field="totalQuantityOnHand" type="Double">
+                                            <calculate field="totalQuantityOnHand">
                                                 <calcop field="totalQuantityOnHand" operator="add"><calcop field="inventoryItem.quantityOnHandTotal" operator="get"/></calcop>
                                             </calculate>
-                                            <calculate field="totalAvailableToPromise" type="Double">
+                                            <calculate field="totalAvailableToPromise">
                                                 <calcop field="totalAvailableToPromise" operator="add"><calcop field="inventoryItem.availableToPromiseTotal" operator="get"/></calcop>
                                             </calculate>
                                         </iterate>
@@ -294,8 +296,8 @@
                                     <if>
                                        <condition>
                                           <and>
-                                                <if-compare field="totalAvailableToPromise" operator="greater" value="0" type="Double"/>
-                                                <if-compare field="targetLocationMoveQuantity" operator="greater" value="0" type="Double"/>
+                                                <if-compare field="totalAvailableToPromise" operator="greater" value="0" type="BigDecimal"/>
+                                                <if-compare field="targetLocationMoveQuantity" operator="greater" value="0" type="BigDecimal"/>
                                           </and>
                                         </condition>
                                     <then>  
@@ -312,18 +314,18 @@
                                         <!--   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="totalAvailableToPromise" to-field="targetLocationMoveQuantity" operator="less" type="Double">
-                                            <calculate field="targetLocationMoveQuantity" type="Double">
+                                        <if-compare-field field="totalAvailableToPromise" to-field="targetLocationMoveQuantity" operator="less" type="BigDecimal">
+                                            <calculate field="targetLocationMoveQuantity">
                                                 <calcop field="targetLocationMoveQuantity" operator="subtract"><calcop field="totalAvailableToPromise" operator="get"/></calcop>
                                             </calculate>
                                             <set from-field="totalAvailableToPromise" field="moveInfo.totalQuantity"/>
-                                            <calculate field="fromLocationTotalAvailableToPromise.${locationSeqId}" type="Double"><number value="0"/></calculate>
+                                            <calculate field="fromLocationTotalAvailableToPromise.${locationSeqId}"><number value="0"/></calculate>
                                         <else>
                                             <set from-field="targetLocationMoveQuantity" field="moveInfo.totalQuantity"/>
-                                            <calculate map-name="fromLocationTotalAvailableToPromise" field-name="${locationSeqId}" type="Double">
+                                            <calculate field="fromLocationTotalAvailableToPromise.${locationSeqId}">
                                                 <calcop field="totalAvailableToPromise" operator="subtract"><calcop field="targetLocationMoveQuantity" operator="get"/></calcop>
                                             </calculate>
-                                            <calculate field="targetLocationMoveQuantity" type="Double"><number value="0"/></calculate>
+                                            <calculate field="targetLocationMoveQuantity"><number value="0"/></calculate>
                                         </else>
                                         </if-compare-field>
                                     
@@ -367,7 +369,7 @@
         <call-simple-method method-name="processOisgirMoveByStatusInline"/>
 
         <!-- Now for any remaining quantity, do a simple, ie non-OISGIR, stock move -->
-        <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="Double">
+        <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="BigDecimal">
             <!-- find InventoryItems in the origin location with some availableToPromise to move -->
             <entity-and entity-name="InventoryItem" list="inventoryItemList">
                 <field-map field-name="productId" from-field="parameters.productId"/>
@@ -378,10 +380,10 @@
 
             <iterate entry="inventoryItem" list="inventoryItemList">
                 <!-- for each inventoryItem only process if quantityLeftToProcess > 0 and inventoryItem.availableToPromiseTotal > 0 -->
-                <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="Double">
-                    <if-compare field="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="Double">
+                <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="BigDecimal">
+                    <if-compare field="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="BigDecimal">
                         <!-- set the currentQuantityToMove to the lower of these two values to ensure we don't move too much -->
-                        <if-compare-field field="quantityLeftToProcess" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="Double">
+                        <if-compare-field field="quantityLeftToProcess" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="BigDecimal">
                             <set from-field="inventoryItem.availableToPromiseTotal" field="currentQuantityToMove"/>
                         <else>
                             <set from-field="quantityLeftToProcess" field="currentQuantityToMove"/>
@@ -389,7 +391,7 @@
                         </if-compare-field>
 
                         <!-- create a new InventoryItem for the targetInventoryItem -->
-                        <make-value entity-name="InventoryItem" map-name="inventoryItem" value-field="targetInventoryItem"/>
+                        <make-value entity-name="InventoryItem" map="inventoryItem" value-field="targetInventoryItem"/>
                         <set from-field="parameters.targetLocationSeqId" field="targetInventoryItem.locationSeqId"/>
                         <!-- now that targetInventoryItem is populated with quantities, etc, call createInventoryItem service -->
                         <clear-field field="createNonOisgirTargetDetailMap"/>
@@ -407,10 +409,10 @@
                         <!-- instead of updating InventoryItem, add an InventoryItemDetail -->
                         <clear-field field="createNonOisgirDetailMap"/>
                         <set from-field="inventoryItem.inventoryItemId" field="createNonOisgirDetailMap.inventoryItemId"/>
-                        <calculate field="createNonOisgirDetailMap.availableToPromiseDiff" type="Double">
+                        <calculate field="createNonOisgirDetailMap.availableToPromiseDiff">
                             <calcop field="currentQuantityToMove" operator="negative"/>
                         </calculate>
-                        <calculate field="createNonOisgirDetailMap.quantityOnHandDiff" type="Double">
+                        <calculate field="createNonOisgirDetailMap.quantityOnHandDiff">
                             <calcop field="currentQuantityToMove" operator="negative"/>
                         </calculate>
                         <call-service service-name="createInventoryItemDetail" in-map-name="createNonOisgirDetailMap"/>
@@ -422,7 +424,7 @@
             </iterate>
         </if-compare>
 
-        <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="Double">
+        <if-compare field="quantityLeftToProcess" operator="greater" value="0" type="BigDecimal">
             <!-- 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="warningMessageList"/>
         </if-compare>
@@ -459,12 +461,12 @@
             -->
             <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-field="targetInventoryItem"/>
+                <make-value entity-name="InventoryItem" map="inventoryItem" value-field="targetInventoryItem"/>
                 <set from-field="parameters.targetLocationSeqId" field="targetInventoryItem.locationSeqId"/>
                 <!-- now that targetInventoryItem is populated with initial values, call createInventoryItem service -->
                 <set-service-fields map="targetInventoryItem" service-name="createInventoryItem" to-map="createInventoryItemMap"/>
                 <call-service service-name="createInventoryItem" in-map-name="createInventoryItemMap">
-                    <result-to-field result-name="inventoryItemId" map-name="targetInventoryItem"/>
+                    <result-to-field result-name="inventoryItemId" field="targetInventoryItem.inventoryItemId"/>
                 </call-service>
                 <!-- refresh the value object now that the create has been done -->
                 <refresh-value value-field="targetInventoryItem"/>
@@ -488,9 +490,9 @@
                          OISGIR (reservation), so we would have to split it up
                     -->
                     <clear-field field="reservedQuantityLeftOver"/>
-                    <if-compare-field field="quantityLeftToProcess" to-field="orderItemShipGrpInvRes.quantity" operator="less" type="Double">
+                    <if-compare-field field="quantityLeftToProcess" to-field="orderItemShipGrpInvRes.quantity" operator="less" type="BigDecimal">
                         <!-- the complicated part: can split up the OISGIR (reservation) into two parts, and then transfer the inventory, somewhat complicated... -->
-                        <calculate field="reservedQuantityLeftOver" type="Double">
+                        <calculate field="reservedQuantityLeftOver">
                             <calcop field="orderItemShipGrpInvRes.quantity" operator="get"/>
                             <calcop field="quantityLeftToProcess" operator="negative"/>
                         </calculate>
@@ -507,7 +509,7 @@
                     </if-compare-field>
                     
                     <!-- now make sure that the currentQuantityToMove we decided on is not greater than remainingQuantityOnHand... -->
-                    <if-compare-field field="currentQuantityToMove" to-field="remainingQuantityOnHand" operator="greater" type="Double">
+                    <if-compare-field field="currentQuantityToMove" to-field="remainingQuantityOnHand" operator="greater" type="BigDecimal">
                         <set from-field="remainingQuantityOnHand" field="currentQuantityToMove"/>
                     </if-compare-field>
                     
@@ -517,7 +519,7 @@
                             <and>
                                 <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"/>
+                                <if-compare-field field="orderItemShipGrpInvRes.quantityNotAvailable" to-field="reservedQuantityLeftOver" operator="greater" type="BigDecimal"/>
                             </and>
                         </condition>
                         <then>
@@ -532,7 +534,7 @@
                     </if>
 
                     <!-- make a new OISGIR value object -->
-                    <make-value entity-name="OrderItemShipGrpInvRes" map-name="orderItemShipGrpInvRes" value-field="targetOrderItemShipGrpInvRes"/>
+                    <make-value entity-name="OrderItemShipGrpInvRes" map="orderItemShipGrpInvRes" value-field="targetOrderItemShipGrpInvRes"/>
                     <set from-field="targetInventoryItem.inventoryItemId" field="targetOrderItemShipGrpInvRes.inventoryItemId"/>
 
                     <!-- okay, move it over, start by calculating new QOHs; note that don't need to modify the ATP since with an OISGIR that has already been subtracted out, so it shouldn't be subtracted from the source or added to the target -->
@@ -541,10 +543,10 @@
                     <clear-field field="createOisgirTargetDetailMap"/>
                     <set from-field="inventoryItem.inventoryItemId" field="createOisgirDetailMap.inventoryItemId"/>
                     <set from-field="targetInventoryItem.inventoryItemId" field="createOisgirTargetDetailMap.inventoryItemId"/>
-                    <calculate field="createOisgirDetailMap.quantityOnHandDiff" type="Double">
+                    <calculate field="createOisgirDetailMap.quantityOnHandDiff">
                         <calcop field="currentQuantityToMove" operator="negative"/>
                     </calculate>
-                    <calculate field="createOisgirTargetDetailMap.quantityOnHandDiff" type="Double">
+                    <calculate field="createOisgirTargetDetailMap.quantityOnHandDiff">
                         <calcop field="currentQuantityToMove" operator="get"/>
                     </calculate>
 
@@ -555,11 +557,11 @@
                     -->
                     <!-- 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="orderItemShipGrpInvRes.quantityNotAvailable">
-                        <if-compare field="orderItemShipGrpInvRes.quantityNotAvailable" operator="greater" value="0" type="Double">
-                            <calculate field="createOisgirDetailMap.availableToPromiseDiff" type="Double">
+                        <if-compare field="orderItemShipGrpInvRes.quantityNotAvailable" operator="greater" value="0" type="BigDecimal">
+                            <calculate field="createOisgirDetailMap.availableToPromiseDiff">
                                 <calcop field="quantityNotAvailableToMove" operator="get"/>
                             </calculate>
-                            <calculate field="createOisgirTargetDetailMap.availableToPromiseDiff" type="Double">
+                            <calculate field="createOisgirTargetDetailMap.availableToPromiseDiff">
                                 <calcop field="quantityNotAvailableToMove" operator="negative"/>
                             </calculate>
                         </if-compare>
@@ -573,11 +575,11 @@
                     <if-empty field="reservedQuantityLeftOver">
                         <remove-value value-field="orderItemShipGrpInvRes"/>
                     <else>
-                        <calculate field="orderItemShipGrpInvRes.quantity" type="Double">
+                        <calculate field="orderItemShipGrpInvRes.quantity">
                             <calcop field="orderItemShipGrpInvRes.quantity" operator="get"/>
                             <calcop field="reservedQuantityLeftOver" operator="negative"/>
                         </calculate>
-                        <calculate field="orderItemShipGrpInvRes.quantityNotAvailable" type="Double">
+                        <calculate field="orderItemShipGrpInvRes.quantityNotAvailable">
                             <calcop field="orderItemShipGrpInvRes.quantityNotAvailable" operator="get"/>
                             <calcop field="quantityNotAvailableToMove" operator="negative"/>
                         </calculate>
@@ -588,11 +590,11 @@
                     <set value="Y" field="haveSetIiDetail"/>
 
                     <!-- deduct the orderItemShipGrpInvRes.quantity from quantityLeftToProcess -->
-                    <calculate field="quantityLeftToProcess" type="Double">
+                    <calculate field="quantityLeftToProcess">
                         <calcop field="quantityLeftToProcess" operator="get"/>
                         <calcop field="currentQuantityToMove" operator="negative"/>
                     </calculate>
-                    <calculate field="remainingQuantityOnHand" type="Double">
+                    <calculate field="remainingQuantityOnHand">
                         <calcop field="remainingQuantityOnHand" operator="subtract"/>
                         <calcop field="currentQuantityToMove" operator="negative"/>
                     </calculate>

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=731851&r1=731850&r2=731851&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 Mon Jan  5 23:13:36 2009
@@ -47,7 +47,7 @@
         <set field="createProductSupplierMap.productId" from-field="productId"/>
         <set field="createProductSupplierMap.partyId" from-field="userLogin.partyId"/>
         <set field="createProductSupplierMap.currencyUomId" from-field="parameters.currencyUomId" default-value="USD"/>
-        <set field="createProductSupplierMap.minimumOrderQuantity" value="1" type="Double"/>
+        <set field="createProductSupplierMap.minimumOrderQuantity" value="1" type="BigDecimal"/>
         <set field="createProductSupplierMap.availableFromDate" from-field="nowTimestamp"/>
         <create-value value-field="createProductSupplierMap"/>
 

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml Mon Jan  5 23:13:36 2009
@@ -436,7 +436,7 @@
             <set from-field="parameters.quantity" field="productCalculatedInfo.totalQuantityOrdered"/>
             <create-value value-field="productCalculatedInfo"/>
         <else>
-            <set field="productCalculatedInfo.totalQuantityOrdered" value="${productCalculatedInfo.totalQuantityOrdered + parameters.quantity}"  type="BigDecimal"/>
+            <set field="productCalculatedInfo.totalQuantityOrdered" value="${productCalculatedInfo.totalQuantityOrdered + parameters.quantity}" type="BigDecimal"/>
             <store-value value-field="productCalculatedInfo"/>
         </else>
         </if-empty>
@@ -581,7 +581,7 @@
             <field field="productId" type="java.lang.String"/>
         </call-class-method>
         <log level="info" message="Got new average customer rating ${averageCustomerRating}"/>
-        <if-compare field="averageCustomerRating" operator="equals" value="0" type="Double">
+        <if-compare field="averageCustomerRating" operator="equals" value="0" type="BigDecimal">
             <return/>
         </if-compare>
         <!-- update the review average on the ProductCalculatedInfo entity -->

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductUomFormulas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductUomFormulas.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductUomFormulas.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductUomFormulas.xml Mon Jan  5 23:13:36 2009
@@ -68,12 +68,12 @@
         <else>
         
             <!-- Determine a conversion value for the From UoM -->
-            <set field="fromVal" type="Double" value="1"/>
+            <set field="fromVal" type="BigDecimal" value="1"/>
             <if-compare field="fromUom.uomTypeId" operator="equals" value="LENGTH_MEASURE">
-                <set field="fromVal" type="Double" from-field="product.productDepth"/>
+                <set field="fromVal" type="BigDecimal" from-field="product.productDepth"/>
             </if-compare>
             <if-compare field="fromUom.uomTypeId" operator="equals" value="AREA_MEASURE">
-                <calculate field="fromVal" type="Double" decimal-scale="15">
+                <calculate field="fromVal" type="BigDecimal" decimal-scale="15">
                     <calcop operator="multiply">
                         <calcop operator="get" field="product.productDepth"/>
                         <calcop operator="get" field="product.productWidth"/>
@@ -81,7 +81,7 @@
                 </calculate>
             </if-compare>
             <if-compare field="fromUom.uomTypeId" operator="equals" value="VOLUME_DRY_MEASURE">
-                <calculate field="fromVal" type="Double" decimal-scale="15">
+                <calculate field="fromVal" type="BigDecimal" decimal-scale="15">
                     <calcop operator="multiply">
                         <calcop operator="get" field="product.productDepth"/>
                         <calcop operator="multiply">
@@ -97,12 +97,12 @@
             <log level="verbose" message="From product-based conversion factor: ${fromVal}"/>
             
             <!-- Determine a conversion value for the To UoM -->
-            <set field="toVal" type="Double" value="1"/>
+            <set field="toVal" type="BigDecimal" value="1"/>
             <if-compare field="toUom.uomTypeId" operator="equals" value="LENGTH_MEASURE">
                 <set field="toVal" from-field="product.productDepth"/>
             </if-compare>
             <if-compare field="toUom.uomTypeId" operator="equals" value="AREA_MEASURE">
-                <calculate field="toVal" type="Double" decimal-scale="15">
+                <calculate field="toVal" type="BigDecimal" decimal-scale="15">
                     <calcop operator="multiply">
                         <calcop operator="get" field="product.productDepth"/>
                         <calcop operator="get" field="product.productWidth"/>
@@ -110,7 +110,7 @@
                 </calculate>
             </if-compare>
             <if-compare field="toUom.uomTypeId" operator="equals" value="VOLUME_DRY_MEASURE">
-                <calculate field="toVal" type="Double" decimal-scale="15">
+                <calculate field="toVal" type="BigDecimal" decimal-scale="15">
                     <calcop operator="multiply">
                         <calcop operator="get" field="product.productDepth"/>
                         <calcop operator="multiply">
@@ -126,7 +126,7 @@
             <log level="verbose" message="To product-based conversion factor: ${toVal}"/>
             
             <!-- Calcualte the product-based conversion factor = toVal / fromVal * uomConversion.conversionFactor -->
-            <calculate field="ratio" type="Double" decimal-scale="15">
+            <calculate field="ratio" type="BigDecimal" decimal-scale="15">
                 <calcop operator="divide">
                     <calcop operator="get" field="toVal"/>
                     <calcop operator="get" field="fromVal"/>
@@ -134,7 +134,7 @@
             </calculate>
             <log level="verbose" message="To/From ratio is ${ratio}"/>
             
-            <calculate field="productFactor" type="Double" decimal-scale="15">
+            <calculate field="productFactor" type="BigDecimal" decimal-scale="15">
                 <calcop operator="multiply">
                     <calcop operator="get" field="args.uomConversion.conversionFactor"/>
                     <calcop operator="get" field="ratio"/>
@@ -145,7 +145,7 @@
         </if-compare-field>
         
         <!-- Convert the value -->
-        <calculate field="totQuantity" type="Double" decimal-scale="15">
+        <calculate field="totQuantity" type="BigDecimal" decimal-scale="15">
             <calcop operator="multiply">
                 <calcop operator="get" field="args.originalValue"/>
                 <calcop operator="get" field="productFactor"/>

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml?rev=731851&r1=731850&r2=731851&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml Mon Jan  5 23:13:36 2009
@@ -426,7 +426,7 @@
                     <result-to-field result-name="quantityNotReserved"/>
                 </call-service>
     
-                <if-compare value="0" field="quantityNotReserved" operator="equals" type="Double">
+                <if-compare value="0" field="quantityNotReserved" operator="equals" type="BigDecimal">
                     <log level="info" message="Inventory IS reserved in facility with id [${productStore.inventoryFacilityId}] for product id [${parameters.productId}]; desired quantity was ${parameters.quantity}"/>
                 <else>
                     <log level="info" message="There is insufficient inventory available in facility with id [${productStore.inventoryFacilityId}] for product id [${parameters.productId}]; desired quantity is ${parameters.quantity}, amount could not reserve is ${quantityNotReserved}"/>
@@ -450,7 +450,7 @@
                         </call-service>
                         <clear-field field="callServiceMap"/>
     
-                        <if-compare-field field="availableToPromiseTotal" to-field="parameters.quantity" operator="greater-equals" type="Double">
+                        <if-compare-field field="availableToPromiseTotal" to-field="parameters.quantity" operator="greater-equals" type="BigDecimal">
                             <set field="storeFound" from-field="productStoreFacility"/>
                         </if-compare-field>
                         <clear-field field="availableToPromiseTotal"/>
@@ -494,7 +494,7 @@
             <call-service service-name="reserveProductInventoryByFacility" in-map-name="callServiceMap">
                 <result-to-field result-name="quantityNotReserved"/>
             </call-service>
-            <if-compare value="0" field="quantityNotReserved" operator="equals" type="Double">
+            <if-compare value="0" field="quantityNotReserved" operator="equals" type="BigDecimal">
                 <log level="info" message="Inventory IS reserved in facility with id [${facilityId}] for product id [${parameters.productId}]; desired quantity was ${parameters.quantity}"/>
             <else>
                 <log level="info" message="There is insufficient inventory available in facility with id [${facilityId}] for product id [${parameters.productId}]; desired quantity is ${parameters.quantity}, amount could not reserve is ${quantityNotReserved}"/>
@@ -600,7 +600,7 @@
                 </else>
             </if>
             <!-- check to see if we got enough back... -->
-            <if-compare-field field="availableToPromiseTotal" to-field="parameters.quantity" operator="greater-equals" type="Double">
+            <if-compare-field field="availableToPromiseTotal" to-field="parameters.quantity" operator="greater-equals" type="BigDecimal">
                 <set value="Y" field="available"/>
                 <log level="info" message="Inventory IS available in facility with id ${productStore.inventoryFacilityId} for product id ${parameters.productId}; desired quantity is ${parameters.quantity}, available quantity is ${availableToPromiseTotal}"/>
             <else>
@@ -642,7 +642,7 @@
 
                     <clear-field field="callServiceMap"/>
                     
-                    <if-compare-field field="availableToPromiseTotal" to-field="parameters.quantity" operator="greater-equals" type="Double">
+                    <if-compare-field field="availableToPromiseTotal" to-field="parameters.quantity" operator="greater-equals" type="BigDecimal">
                         <set value="Y" field="available"/>
                         <log level="info" message="Inventory IS available in facility with id ${productStoreFacility.facilityId} for product id ${parameters.productId}; desired quantity is ${parameters.quantity}, available quantity is ${availableToPromiseTotal}"/>
                     </if-compare-field>