svn commit: r721986 [7/13] - in /ofbiz/branches/typecheckcleanup200810: applications/accounting/script/org/ofbiz/accounting/olap/ applications/order/entitydef/ applications/order/script/org/ofbiz/order/order/ applications/order/script/org/ofbiz/order/q...

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

svn commit: r721986 [7/13] - in /ofbiz/branches/typecheckcleanup200810: applications/accounting/script/org/ofbiz/accounting/olap/ applications/order/entitydef/ applications/order/script/org/ofbiz/order/order/ applications/order/script/org/ofbiz/order/q...

lektran
Modified: ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java Sun Nov 30 22:51:11 2008
@@ -58,7 +58,7 @@
         orderPaymentInfo.add(orderContactMech);
         
         GenericValue orderPaymentPreference = delegator.makeValue("OrderPaymentPreference", UtilMisc.toMap("paymentMethodId", "9015", "paymentMethodTypeId", "CREDIT_CARD",
-                "statusId", "PAYMENT_NOT_AUTH", "overflowFlag", "N", "maxAmount", new Double(49.26)));
+                "statusId", "PAYMENT_NOT_AUTH", "overflowFlag", "N", "maxAmount", new BigDecimal("49.26")));
         orderPaymentInfo.add(orderPaymentPreference);
         ctx.put("orderPaymentInfo", orderPaymentInfo);
         
@@ -70,11 +70,11 @@
                 "shipGroupSeqId", "00001", "shipmentMethodTypeId", "NEXT_DAY"));
         orderItemShipGroupInfo.add(orderItemShipGroup);
         
-        GenericValue orderItemShipGroupAssoc = delegator.makeValue("OrderItemShipGroupAssoc", UtilMisc.toMap("orderItemSeqId", "00001", "quantity", new Double(1.0), "shipGroupSeqId", "00001"));
+        GenericValue orderItemShipGroupAssoc = delegator.makeValue("OrderItemShipGroupAssoc", UtilMisc.toMap("orderItemSeqId", "00001", "quantity", BigDecimal.ONE, "shipGroupSeqId", "00001"));
         orderItemShipGroupInfo.add(orderItemShipGroupAssoc);
         
         GenericValue orderAdjustment = null;
-        orderAdjustment = delegator.makeValue("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "SHIPPING_CHARGES", "shipGroupSeqId", "00001", "amount", new Double(12.45)));
+        orderAdjustment = delegator.makeValue("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "SHIPPING_CHARGES", "shipGroupSeqId", "00001", "amount", new BigDecimal("12.45")));
         orderItemShipGroupInfo.add(orderAdjustment);
         
         orderAdjustment = delegator.makeValue("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "SALES_TAX", "orderItemSeqId", "00001", "overrideGlAccountId", "224153",
@@ -112,11 +112,11 @@
         ctx.put("orderAdjustments", orderAdjustments);
 
         List orderItems = new ArrayList();
-        GenericValue orderItem = delegator.makeValue("OrderItem", UtilMisc.toMap("orderItemSeqId", "00001", "orderItemTypeId", "PRODUCT_ORDER_ITEM", "prodCatalogId", "DemoCatalog", "productId", "GZ-2644", "quantity", new Double(1), "selectedAmount", new Double(0.0)));
+        GenericValue orderItem = delegator.makeValue("OrderItem", UtilMisc.toMap("orderItemSeqId", "00001", "orderItemTypeId", "PRODUCT_ORDER_ITEM", "prodCatalogId", "DemoCatalog", "productId", "GZ-2644", "quantity", BigDecimal.ONE, "selectedAmount", BigDecimal.ZERO));
         orderItem.set("isPromo", "N");
         orderItem.set("isModifiedPrice", "N");
-        orderItem.set("unitPrice", new Double(38.4));
-        orderItem.set("unitListPrice", new Double(48.0));
+        orderItem.set("unitPrice", new BigDecimal("38.4"));
+        orderItem.set("unitListPrice", new BigDecimal("48.0"));
         orderItem.set("statusId", "ITEM_CREATED");
         
         orderItems.add(orderItem);

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareServices.java?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareServices.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareServices.java Sun Nov 30 22:51:11 2008
@@ -27,6 +27,8 @@
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.ModelService;
 
+import com.ibm.icu.math.BigDecimal;
+
 /**
  * TaxwareServices
  */
@@ -37,7 +39,7 @@
         List items = (List) context.get("itemProductList");
         List amnts = (List) context.get("itemAmountList");
         List ishpn = (List) context.get("itemShippingList");
-        Double shipping = (Double) context.get("orderShippingAmount");
+        BigDecimal shipping = (BigDecimal) context.get("orderShippingAmount");
         GenericValue address = (GenericValue) context.get("shippingAddress");
 
         if (items.size() != amnts.size()) {
@@ -49,14 +51,14 @@
         try {
             TaxwareUTL utl = new TaxwareUTL();
 
-            utl.setShipping(shipping != null ? shipping.doubleValue() : 0.0);
+            utl.setShipping(shipping != null ? shipping : BigDecimal.ZERO);
             utl.setShipAddress(address);
             for (int i = 0; i < items.size(); i++) {
                 GenericValue p = (GenericValue) items.get(i);
-                Double amount = (Double) amnts.get(i);
-                Double ishp = ishpn != null ? (Double) ishpn.get(i) : new Double(0.0);
+                BigDecimal amount = (BigDecimal) amnts.get(i);
+                BigDecimal ishp = ishpn != null ? (BigDecimal) ishpn.get(i) : BigDecimal.ZERO;
 
-                utl.addItem(p, amount.doubleValue(), ishp.doubleValue());
+                utl.addItem(p, amount, ishp);
             }
 
             int resp = utl.process();

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java Sun Nov 30 22:51:11 2008
@@ -24,6 +24,7 @@
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
@@ -54,7 +55,7 @@
     DataFile outHead = null;
     DataFile outItem = null;
 
-    double shippingAmount = 0.00;
+    BigDecimal shippingAmount = BigDecimal.ZERO;
     List orderAdjustments = new ArrayList();
     List itemAdjustments = new ArrayList();
 
@@ -91,7 +92,7 @@
             Record shipping = outItem.makeRecord("outItem");
 
             shipping = makeItemData(shipping);
-            shipping.set("FREIGHT_AMOUNT", new Double(shippingAmount));
+            shipping.set("FREIGHT_AMOUNT", shippingAmount);
             outItem.addRecord(shipping);
         }
 
@@ -146,7 +147,7 @@
         return returnCode;
     }
 
-    public void setShipping(double shippingAmount) {
+    public void setShipping(BigDecimal shippingAmount) {
         this.shippingAmount = shippingAmount;
         setShipping = true;
     }
@@ -308,81 +309,81 @@
             if (itemAdjustments.size() < records.size()) {
                 List currentItem = new ArrayList();
 
-                if (rec.getDouble("TAX_AMT_COUNTRY").doubleValue() > 0) {
-                    if (Debug.verboseOn()) Debug.logVerbose("Country Tax Amount: " + rec.getDouble("TAX_AMT_COUNTRY"), module);
-                    Double rate = new Double(rec.getDouble("TAX_RATE_COUNTRY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_COUNTRY").compareTo(BigDecimal.ZERO) > 0) {
+                    if (Debug.verboseOn()) Debug.logVerbose("Country Tax Amount: " + rec.getBigDecimal("TAX_AMT_COUNTRY"), module);
+                    BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTRY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_COUNTRY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTRY") != null ? rec.getString("JUR_COUNTRY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     currentItem.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_COUNTRY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_COUNTRY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_STATE").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_STATE").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_STATE").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_STATE").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_STATE").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_STATE") != null ? rec.getString("JUR_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     currentItem.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_STATE"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_STATE"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_COUNTY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_COUNTY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTY_CODE") != null ? rec.getString("JUR_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     currentItem.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_COUNTY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_COUNTY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_CITY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_CITY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_CITY").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_CITY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_CITY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_CITY") != null ? rec.getString("JUR_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     currentItem.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_CITY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_CITY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_SEC_STATE").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_SEC_STATE").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_SEC_STATE").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_STATE").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_STATE").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_STATE") != null ? rec.getString("JUR_SEC_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     currentItem.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_SEC_STATE"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_SEC_STATE"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_SEC_COUNTY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_SEC_COUNTY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_SEC_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_COUNTY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_COUNTY_CODE") != null ? rec.getString("JUR_SEC_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     currentItem.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_SEC_COUNTY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_SEC_COUNTY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_SEC_CITY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_SEC_CITY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_SEC_CITY").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_CITY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_CITY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_CITY") != null ? rec.getString("JUR_SEC_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     currentItem.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_SEC_CITY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_SEC_CITY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
@@ -390,80 +391,80 @@
                 itemAdjustments.add(currentItem);
 
             } else if (orderAdjustments.size() == 0) {
-                if (rec.getDouble("TAX_AMT_COUNTRY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_COUNTRY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_COUNTRY").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTRY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_COUNTRY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTRY") != null ? rec.getString("JUR_COUNTRY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     orderAdjustments.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_COUNTRY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_COUNTRY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_STATE").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_STATE").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_STATE").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_STATE").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_STATE").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_STATE") != null ? rec.getString("JUR_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     orderAdjustments.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_STATE"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_STATE"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_COUNTY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_COUNTY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTY_CODE") != null ? rec.getString("JUR_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     orderAdjustments.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_COUNTY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_COUNTY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_CITY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_CITY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_CITY")..compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_CITY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_CITY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_CITY") != null ? rec.getString("JUR_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     orderAdjustments.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_CITY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_CITY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_SEC_STATE").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_SEC_STATE").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_SEC_STATE").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_STATE").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_STATE").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_STATE") != null ? rec.getString("JUR_SEC_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     orderAdjustments.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_SEC_STATE"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_SEC_STATE"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_SEC_COUNTY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_SEC_COUNTY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_SEC_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_COUNTY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_COUNTY_CODE") != null ? rec.getString("JUR_SEC_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     orderAdjustments.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_SEC_COUNTY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_SEC_COUNTY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 
-                if (rec.getDouble("TAX_AMT_SEC_CITY").doubleValue() > 0) {
-                    Double rate = new Double(rec.getDouble("TAX_RATE_SEC_CITY").doubleValue() * 100);
+                if (rec.getBigDecimal("TAX_AMT_SEC_CITY").compareTo(BigDecimal.ZERO) > 0) {
+                 BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_CITY").movePointRight(2);
                     String type = rec.getString("TAX_TYPE_SEC_CITY").equals("S") ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_CITY") != null ? rec.getString("JUR_SEC_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
                     orderAdjustments.add(delegator.makeValue("OrderAdjustment",
-                            UtilMisc.toMap("amount", rec.getDouble("TAX_AMT_SEC_CITY"),
+                            UtilMisc.toMap("amount", rec.getBigDecimal("TAX_AMT_SEC_CITY"),
                                 "orderAdjustmentTypeId", "SALES_TAX", "comments", comments)));
                 }
 

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java Sun Nov 30 22:51:11 2008
@@ -18,6 +18,7 @@
  *******************************************************************************/
 package org.ofbiz.order.thirdparty.zipsales;
 
+import java.math.BigDecimal;
 import java.net.URL;
 import java.sql.Timestamp;
 import java.text.DecimalFormat;
@@ -59,10 +60,6 @@
     public static final String ruleTable = "FreightRuleTable";
     public static final String resource_error = "OrderErrorUiLabels";
 
-    // number formatting
-    private static String curFmtStr = UtilProperties.getPropertyValue("general.properties", "currency.decimal.format", "##0.00");
-    private static DecimalFormat curFormat = new DecimalFormat(curFmtStr);
-
     // date formatting
     private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
 
@@ -218,7 +215,7 @@
         List itemProductList = (List) context.get("itemProductList");
         List itemAmountList = (List) context.get("itemAmountList");
         List itemShippingList = (List) context.get("itemShippingList");
-        Double orderShippingAmount = (Double) context.get("orderShippingAmount");
+        BigDecimal orderShippingAmount = (BigDecimal) context.get("orderShippingAmount");
         GenericValue shippingAddress = (GenericValue) context.get("shippingAddress");
 
         // flatTaxCalc only uses the Zip + City from the address
@@ -246,12 +243,12 @@
             // loop through and get per item tax rates
             for (int i = 0; i < itemProductList.size(); i++) {
                 GenericValue product = (GenericValue) itemProductList.get(i);
-                Double itemAmount = (Double) itemAmountList.get(i);
-                Double shippingAmount = (Double) itemShippingList.get(i);
-                itemAdjustments.add(getItemTaxList(delegator, product, postalCode, city, itemAmount.doubleValue(), shippingAmount.doubleValue(), false));
+                BigDecimal itemAmount = (BigDecimal) itemAmountList.get(i);
+                BigDecimal shippingAmount = (BigDecimal) itemShippingList.get(i);
+                itemAdjustments.add(getItemTaxList(delegator, product, postalCode, city, itemAmount, shippingAmount, false));
             }
-            if (orderShippingAmount.doubleValue() > 0) {
-                List taxList = getItemTaxList(delegator, null, postalCode, city, 0.00, orderShippingAmount.doubleValue(), false);
+            if (orderShippingAmount.compareTo(BigDecimal.ZERO) > 0) {
+                List taxList = getItemTaxList(delegator, null, postalCode, city, BigDecimal.ZERO, orderShippingAmount, false);
                 orderAdjustments.addAll(taxList);
             }
         } catch (GeneralException e) {
@@ -264,7 +261,7 @@
         return result;
     }
 
-    private static List getItemTaxList(GenericDelegator delegator, GenericValue item, String zipCode, String city, double itemAmount, double shippingAmount, boolean isUseTax) throws GeneralException {
+    private static List getItemTaxList(GenericDelegator delegator, GenericValue item, String zipCode, String city, BigDecimal itemAmount, BigDecimal shippingAmount, boolean isUseTax) throws GeneralException {
         List adjustments = new ArrayList();
 
         // check the item for tax status
@@ -333,7 +330,7 @@
             fieldName = "comboUseTax";
         }
 
-        Double comboTaxRate = taxEntry.getDouble(fieldName);
+        BigDecimal comboTaxRate = taxEntry.getBigDecimal(fieldName);
         if (comboTaxRate == null) {
             Debug.logWarning("No Combo Tax Rate In Field " + fieldName + " @ " + zipCode + " / " + city + " - " + itemAmount, module);
             return adjustments;
@@ -468,21 +465,19 @@
             }
         }
 
-        double taxableAmount = itemAmount;
+        BigDecimal taxableAmount = itemAmount;
         if (taxShipping) {
             //Debug.log("Taxing shipping", module);
-            taxableAmount += shippingAmount;
+            taxableAmount = taxableAmount.add(shippingAmount);
         } else {
             Debug.log("Shipping is not taxable", module);
         }
 
         // calc tax amount
-        double taxRate = comboTaxRate.doubleValue();
-        double taxCalc = taxableAmount * taxRate;
+        BigDecimal taxRate = comboTaxRate;
+        BigDecimal taxCalc = taxableAmount.multiply(taxRate);
 
-        // format the number
-        Double taxAmount = new Double(formatCurrency(taxCalc));
-        adjustments.add(delegator.makeValue("OrderAdjustment", UtilMisc.toMap("amount", taxAmount, "orderAdjustmentTypeId", "SALES_TAX", "comments", Double.toString(taxRate), "description", "Sales Tax (" + stateCode + ")")));
+        adjustments.add(delegator.makeValue("OrderAdjustment", UtilMisc.toMap("amount", taxCalc, "orderAdjustmentTypeId", "SALES_TAX", "comments", taxRate, "description", "Sales Tax (" + stateCode + ")")));
 
         return adjustments;
     }
@@ -504,8 +499,4 @@
             return useWhenNull;
         }
     }
-
-    private static String formatCurrency(double currency) {
-        return curFormat.format(currency);
-    }
 }

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/eecas.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/eecas.xml?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/eecas.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/eecas.xml Sun Nov 30 22:51:11 2008
@@ -39,7 +39,7 @@
     <eca entity="InventoryItem" operation="create-store" event="return">
         <condition field-name="productId" operator="is-not-empty"/>
         <condition field-name="availableToPromiseTotal" operator="is-not-empty"/>
-        <condition field-name="availableToPromiseTotal" operator="less-equals" value="0" type="Double"/>
+        <condition field-name="availableToPromiseTotal" operator="less-equals" value="0" type="BigDecimal"/>
         <action service="checkProductInventoryDiscontinuation" mode="async"/>
     </eca>
     <!-- update the totals for serialized inventory items -->

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml Sun Nov 30 22:51:11 2008
@@ -251,7 +251,7 @@
       <field name="purchaseFromDate" type="date-time"></field>
       <field name="purchaseThruDate" type="date-time"></field>
       <field name="useCountLimit" type="numeric"></field>
-      <field name="useDaysLimit" type="floating-point"></field>
+      <field name="useDaysLimit" type="fixed-point"></field>
       <prim-key field="productCategoryId"/>
       <prim-key field="contentId"/>
       <prim-key field="prodCatContentTypeId"/>
@@ -370,7 +370,7 @@
         <field name="thruDate" type="date-time"></field>
         <field name="comments" type="comment"></field>
         <field name="sequenceNum" type="numeric"></field>
-        <field name="quantity" type="floating-point"></field>
+        <field name="quantity" type="fixed-point"></field>
         <prim-key field="productCategoryId"/>
         <prim-key field="productId"/>
         <prim-key field="fromDate"/>
@@ -682,7 +682,7 @@
         <field name="configItemId" type="id-ne"></field>
         <field name="configOptionId" type="id-ne"></field>
         <field name="productId" type="id-ne"></field>
-        <field name="quantity" type="floating-point"></field>
+        <field name="quantity" type="fixed-point"></field>
         <field name="sequenceNum" type="numeric"></field>
         <prim-key field="configItemId"/>
         <prim-key field="configOptionId"/>
@@ -777,7 +777,7 @@
       <field name="costComponentCalcId" type="id"></field>
       <field name="fromDate" type="date-time"></field>
       <field name="thruDate" type="date-time"></field>
-      <field name="cost" type="floating-point"><description>Higher precision in case it is a calculated number</description></field>
+      <field name="cost" type="fixed-point"><description>Higher precision in case it is a calculated number</description></field>
       <field name="costUomId" type="id"></field>
       <prim-key field="costComponentId"/>
       <relation type="one" fk-name="COST_COMP_TYPE" rel-entity-name="CostComponentType">
@@ -1191,8 +1191,8 @@
     <entity entity-name="ProductFacility" package-name="org.ofbiz.product.facility" title="Product Facility Entity">
         <field name="productId" type="id-ne"></field>
         <field name="facilityId" type="id-ne"></field>
-        <field name="minimumStock" type="floating-point"></field>
-        <field name="reorderQuantity" type="floating-point"></field>
+        <field name="minimumStock" type="fixed-point"></field>
+        <field name="reorderQuantity" type="fixed-point"></field>
         <field name="daysToShip" type="numeric"></field>
         <prim-key field="productId"/>
         <prim-key field="facilityId"/>
@@ -1207,8 +1207,8 @@
         <field name="productId" type="id-ne"></field>
         <field name="facilityId" type="id-ne"></field>
         <field name="locationSeqId" type="id-ne"></field>
-        <field name="minimumStock" type="floating-point"></field>
-        <field name="moveQuantity" type="floating-point"></field>
+        <field name="minimumStock" type="fixed-point"></field>
+        <field name="moveQuantity" type="fixed-point"></field>
         <prim-key field="productId"/>
         <prim-key field="facilityId"/>
         <prim-key field="locationSeqId"/>
@@ -1294,7 +1294,7 @@
       <field name="productFeatureCategoryId" type="id"></field>
       <field name="description" type="description"></field>
       <field name="uomId" type="id"></field>
-      <field name="numberSpecified" type="floating-point"></field>
+      <field name="numberSpecified" type="fixed-point"></field>
       <field name="defaultAmount" type="currency-amount"></field>
       <field name="defaultSequenceNum" type="numeric"></field>
       <field name="abbrev" type="id"></field>
@@ -1625,15 +1625,15 @@
       <field name="binNumber" type="id"></field>
       <field name="locationSeqId" type="id"></field>
       <field name="comments" type="comment"></field>
-      <field name="quantityOnHandTotal" type="floating-point"></field>
-      <field name="availableToPromiseTotal" type="floating-point"></field>
-      <field name="oldQuantityOnHand" col-name="QUANTITY_ON_HAND" type="floating-point"></field>
-      <field name="oldAvailableToPromise" col-name="AVAILABLE_TO_PROMISE" type="floating-point"></field>
+      <field name="quantityOnHandTotal" type="fixed-point"></field>
+      <field name="availableToPromiseTotal" type="fixed-point"></field>
+      <field name="oldQuantityOnHand" col-name="QUANTITY_ON_HAND" type="fixed-point"></field>
+      <field name="oldAvailableToPromise" col-name="AVAILABLE_TO_PROMISE" type="fixed-point"></field>
       <field name="serialNumber" type="value"></field>
       <field name="softIdentifier" type="value"></field>
       <field name="activationNumber" type="value"></field>
       <field name="activationValidThru" type="date-time"></field>
-      <field name="unitCost" type="floating-point"><description>Higher precision in case it is a calculated number</description></field>
+      <field name="unitCost" type="fixed-point"><description>Higher precision in case it is a calculated number</description></field>
       <field name="currencyUomId" type="id"><description>The currency Uom of the unit cost.</description></field>
       <prim-key field="inventoryItemId"/>
       <relation type="one" fk-name="INV_ITEM_TYPE" rel-entity-name="InventoryItemType">
@@ -1757,9 +1757,9 @@
       <field name="inventoryItemId" type="id-ne"></field>
       <field name="inventoryItemDetailSeqId" type="id-ne"></field>
       <field name="effectiveDate" type="date-time"></field>
-      <field name="quantityOnHandDiff" type="floating-point"></field>
-      <field name="availableToPromiseDiff" type="floating-point"></field>
-      <field name="unitCost" type="floating-point"></field>
+      <field name="quantityOnHandDiff" type="fixed-point"></field>
+      <field name="availableToPromiseDiff" type="fixed-point"></field>
+      <field name="unitCost" type="fixed-point"></field>
       <field name="orderId" type="id"></field>
       <field name="orderItemSeqId" type="id"></field>
       <field name="shipGroupSeqId" type="id"></field>
@@ -1879,7 +1879,7 @@
       <field name="visitId" type="id-ne"></field>
       <field name="productId" type="id-ne"></field>
       <field name="productStoreId" type="id-ne"></field>
-      <field name="quantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
       <field name="reservedDate" type="date-time"></field>
       <prim-key field="visitId"/>
       <prim-key field="productId"/>
@@ -1930,8 +1930,8 @@
       <field name="inventoryItemId" type="id-ne"></field>
       <field name="physicalInventoryId" type="id-ne"></field>
       <field name="varianceReasonId" type="id"></field>
-      <field name="availableToPromiseVar" type="floating-point"></field>
-      <field name="quantityOnHandVar" type="floating-point"></field>
+      <field name="availableToPromiseVar" type="fixed-point"></field>
+      <field name="quantityOnHandVar" type="fixed-point"></field>
       <field name="comments" type="comment"></field>
       <prim-key field="inventoryItemId"/>
       <prim-key field="physicalInventoryId"/>
@@ -2039,7 +2039,7 @@
             title="Lot Entity">
       <field name="lotId" type="id-ne"></field>
       <field name="creationDate" type="date-time"></field>
-      <field name="quantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
       <field name="expirationDate" type="date-time"></field>
       <prim-key field="lotId"/>
     </entity>
@@ -2184,7 +2184,7 @@
       <field name="productPriceRuleId" type="id-ne"></field>
       <field name="productPriceActionSeqId" type="id-ne"></field>
       <field name="productPriceActionTypeId" type="id-ne"></field>
-      <field name="amount" type="floating-point"></field>
+      <field name="amount" type="fixed-point"></field>
       <field name="rateCode" type="short-varchar"></field>
       <prim-key field="productPriceRuleId"/>
       <prim-key field="productPriceActionSeqId"/>
@@ -2293,8 +2293,8 @@
             title="Quantity Break Entity">
       <field name="quantityBreakId" type="id-ne"></field>
       <field name="quantityBreakTypeId" type="id"></field>
-      <field name="fromQuantity" type="floating-point"></field>
-      <field name="thruQuantity" type="floating-point"></field>
+      <field name="fromQuantity" type="fixed-point"></field>
+      <field name="thruQuantity" type="fixed-point"></field>
       <prim-key field="quantityBreakId"/>
       <relation type="one" fk-name="QUANT_BRK_TYPE" rel-entity-name="QuantityBreakType">
         <key-map field-name="quantityBreakTypeId"/>
@@ -2431,23 +2431,23 @@
       <field name="inventoryMessage" type="description"></field>
       <field name="requireInventory" type="indicator"></field>
       <field name="quantityUomId" type="id"></field>
-      <field name="quantityIncluded" type="floating-point"></field>
+      <field name="quantityIncluded" type="fixed-point"></field>
       <field name="piecesIncluded" type="numeric"></field>
       <field name="requireAmount" type="indicator"></field>
       <field name="fixedAmount" type="currency-amount"><description>Use this for products which are sold in fixed denominations, such as gift certificates or calling cards.</description></field>
       <field name="amountUomTypeId" type="id"></field>
       <field name="weightUomId" type="id"></field>
-      <field name="weight" type="floating-point"></field>
+      <field name="weight" type="fixed-point"></field>
       <field name="heightUomId" type="id"></field>
-      <field name="productHeight" type="floating-point"></field>
-      <field name="shippingHeight" type="floating-point"></field>
+      <field name="productHeight" type="fixed-point"></field>
+      <field name="shippingHeight" type="fixed-point"></field>
       <field name="widthUomId" type="id"></field>
-      <field name="productWidth" type="floating-point"></field>
-      <field name="shippingWidth" type="floating-point"></field>
+      <field name="productWidth" type="fixed-point"></field>
+      <field name="shippingWidth" type="fixed-point"></field>
       <field name="depthUomId" type="id"></field>
-      <field name="productDepth" type="floating-point"></field>
-      <field name="shippingDepth" type="floating-point"></field>
-      <field name="productRating" type="floating-point"></field>
+      <field name="productDepth" type="fixed-point"></field>
+      <field name="shippingDepth" type="fixed-point"></field>
+      <field name="productRating" type="fixed-point"></field>
       <field name="ratingTypeEnum" type="id"></field>
       <field name="returnable" type="indicator"></field>
       <field name="taxable" type="indicator"></field>
@@ -2460,9 +2460,9 @@
       <field name="originGeoId" type="id"></field>
       <field name="requirementMethodEnumId" type="id"></field>
       <field name="billOfMaterialLevel" type="numeric"></field>
-      <field name="reservMaxPersons" type="floating-point"><description>maximum number of persons who can rent this asset at the same time</description></field>
-      <field name="reserv2ndPPPerc" type="floating-point"><description>percentage of the end price for the 2nd person renting this asset connected to this product</description></field>
-      <field name="reservNthPPPerc" type="floating-point"><description>percentage of the end price for the Nth person renting this asset connected to this product</description></field>
+      <field name="reservMaxPersons" type="fixed-point"><description>maximum number of persons who can rent this asset at the same time</description></field>
+      <field name="reserv2ndPPPerc" type="fixed-point"><description>percentage of the end price for the 2nd person renting this asset connected to this product</description></field>
+      <field name="reservNthPPPerc" type="fixed-point"><description>percentage of the end price for the Nth person renting this asset connected to this product</description></field>
       <field name="configId" type="id"><description>Used to safe the persisted configuration Id for AGGREGATED products.</description></field>
       <field name="createdDate" type="date-time"></field>
       <field name="createdByUserLogin" type="id-vlong"></field>
@@ -2539,8 +2539,8 @@
       <field name="thruDate" type="date-time"></field>
       <field name="sequenceNum" type="numeric"></field>
       <field name="reason" type="long-varchar"></field>
-      <field name="quantity" type="floating-point"></field>
-      <field name="scrapFactor" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
+      <field name="scrapFactor" type="fixed-point"></field>
       <field name="instruction" type="long-varchar"></field>
       <field name="routingWorkEffortId" type="id"></field>
       <field name="estimateCalcMethod" type="id"></field>
@@ -2628,9 +2628,9 @@
             package-name="org.ofbiz.product.product"
             title="Product Calculated Info Entity">
         <field name="productId" type="id-ne"></field>
-        <field name="totalQuantityOrdered" type="floating-point"></field>
+        <field name="totalQuantityOrdered" type="fixed-point"></field>
         <field name="totalTimesViewed" type="numeric"></field>
-        <field name="averageCustomerRating" type="floating-point"></field>
+        <field name="averageCustomerRating" type="fixed-point"></field>
         <prim-key field="productId"/>
         <relation type="one" fk-name="PRODCI_PROD" rel-entity-name="Product">
             <key-map field-name="productId"/>
@@ -2844,7 +2844,7 @@
         <field name="productMaintTypeId" type="id"></field>
         <field name="maintName" type="name"></field>
         <field name="maintTemplateWorkEffortId" type="id"><description>Template of Maintenance Plan. WorkEffort may have WorkEffortAssocs for tasks/breakdown detailes</description></field>
-        <field name="intervalQuantity" type="floating-point"></field>
+        <field name="intervalQuantity" type="fixed-point"></field>
         <field name="intervalUomId" type="id"><description>UOM for intervalQuantity; if used intervalMeterTypeId is generally not used (ie one or the other)</description></field>
         <field name="intervalMeterTypeId" type="id"><description>Meter Type for intervalQuantity; if used intervalUomId is generally not used (ie one or the other)</description></field>
         <field name="repeatCount" type="numeric"><description>If 0 or null means no limit to repeat count; can be used with multiple ProductMaint records for a single ProductMaintType in cases where maintenance intervals are not evenly distributed, or only need to be done once like a break-in period</description></field>
@@ -2894,7 +2894,7 @@
         <field name="statusId" type="id"></field>
         <field name="postedAnonymous" type="indicator"></field>
         <field name="postedDateTime" type="date-time"></field>
-        <field name="productRating" type="floating-point"></field>
+        <field name="productRating" type="fixed-point"></field>
         <field name="productReview" type="very-long"></field>
         <prim-key field="productReviewId"/>
         <relation type="one" fk-name="PROD_REVIEW_PRDSTR" rel-entity-name="ProductStore">
@@ -3111,7 +3111,7 @@
       <field name="useLimitPerOrder" type="numeric"></field>
       <field name="useLimitPerCustomer" type="numeric"></field>
       <field name="useLimitPerPromotion" type="numeric"></field>
-      <field name="billbackFactor" type="floating-point"></field>
+      <field name="billbackFactor" type="fixed-point"></field>
       <field name="overrideOrgPartyId" type="id"></field>
       <field name="createdDate" type="date-time"></field>
       <field name="createdByUserLogin" type="id-vlong"></field>
@@ -3136,8 +3136,8 @@
       <field name="productPromoActionSeqId" type="id-ne"></field>
       <field name="productPromoActionEnumId" type="id-ne"></field>
       <field name="orderAdjustmentTypeId" type="id"></field>
-      <field name="quantity" type="floating-point"></field>
-      <field name="amount" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
+      <field name="amount" type="fixed-point"></field>
       <field name="productId" type="id"></field>
       <field name="partyId" type="id"></field>
       <prim-key field="productPromoId"/>
@@ -3862,10 +3862,10 @@
       <field name="partyId" type="id-ne"></field>
       <field name="roleTypeId" type="id-ne"></field>
       <field name="companyPartyId" type="id"></field>
-      <field name="minWeight" type="floating-point"></field>
-      <field name="maxWeight" type="floating-point"></field>
-      <field name="minSize" type="floating-point"></field>
-      <field name="maxSize" type="floating-point"></field>
+      <field name="minWeight" type="fixed-point"></field>
+      <field name="maxWeight" type="fixed-point"></field>
+      <field name="minSize" type="fixed-point"></field>
+      <field name="maxSize" type="fixed-point"></field>
       <field name="minTotal" type="currency-amount"></field>
       <field name="maxTotal" type="currency-amount"></field>
       <field name="allowUspsAddr" type="indicator"></field>
@@ -4321,8 +4321,8 @@
       <field name="geoId" type="id"></field>
       <field name="fromDate" type="date-time"></field>
       <field name="thruDate" type="date-time"></field>
-      <field name="reorderQuantity" type="floating-point"></field>
-      <field name="reorderLevel" type="floating-point"></field>
+      <field name="reorderQuantity" type="fixed-point"></field>
+      <field name="reorderLevel" type="fixed-point"></field>
       <prim-key field="reorderGuidelineId"/>
       <relation type="one" fk-name="REORDER_GD_PROD" rel-entity-name="Product">
         <key-map field-name="productId"/>
@@ -4353,10 +4353,10 @@
       <field name="availableThruDate" type="date-time"></field>
       <field name="supplierPrefOrderId" type="id"></field>
       <field name="supplierRatingTypeId" type="id"></field>
-      <field name="standardLeadTimeDays" type="floating-point"></field>
-      <field name="minimumOrderQuantity" type="floating-point"></field>
-      <field name="orderQtyIncrements" type="floating-point"></field>
-      <field name="unitsIncluded" type="floating-point"></field>
+      <field name="standardLeadTimeDays" type="fixed-point"></field>
+      <field name="minimumOrderQuantity" type="fixed-point"></field>
+      <field name="orderQtyIncrements" type="fixed-point"></field>
+      <field name="unitsIncluded" type="fixed-point"></field>
       <field name="quantityUomId" type="id"></field>
       <field name="agreementId" type="id"></field>
       <field name="agreementItemSeqId" type="id"></field>
@@ -4365,7 +4365,7 @@
       <field name="supplierProductName" type="name"></field>
       <field name="supplierProductId" type="id"></field>
       <field name="canDropShip" type="indicator"></field>
-      <field name="supplierCommissionPerc" type="floating-point"></field>
+      <field name="supplierCommissionPerc" type="fixed-point"></field>
       <field name="comments" type="comment"></field>
       <prim-key field="productId"/>
       <prim-key field="partyId"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml Sun Nov 30 22:51:11 2008
@@ -196,7 +196,7 @@
       <field name="shipGroupSeqId" type="id-ne"></field>
       <field name="inventoryItemId" type="id-ne"></field>
       <field name="itemStatusId" type="id-ne"></field>
-      <field name="quantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
       <prim-key field="picklistBinId"/>
       <prim-key field="orderId"/>
       <prim-key field="orderItemSeqId"/>
@@ -341,8 +341,8 @@
       <field name="receivedByUserLoginId" type="id-vlong"></field>
       <field name="datetimeReceived" type="date-time"></field>
       <field name="itemDescription" type="description"></field>
-      <field name="quantityAccepted" type="floating-point"></field>
-      <field name="quantityRejected" type="floating-point"></field>
+      <field name="quantityAccepted" type="fixed-point"></field>
+      <field name="quantityRejected" type="fixed-point"></field>
       <prim-key field="receiptId"/>
       <relation type="one" fk-name="SHP_RCPT_INVITM" rel-entity-name="InventoryItem">
         <key-map field-name="inventoryItemId"/>
@@ -478,9 +478,9 @@
       <field name="estimatedStartDate" type="date-time"></field>
       <field name="estimatedArrivalDate" type="date-time"></field>
       <field name="fixedAssetId" type="id"></field>
-      <field name="startMileage" type="floating-point"></field>
-      <field name="endMileage" type="floating-point"></field>
-      <field name="fuelUsed" type="floating-point"></field>
+      <field name="startMileage" type="fixed-point"></field>
+      <field name="endMileage" type="fixed-point"></field>
+      <field name="fuelUsed" type="fixed-point"></field>
       <prim-key field="deliveryId"/>
       <relation type="one" fk-name="DELIV_FXAS" rel-entity-name="FixedAsset">
         <key-map field-name="fixedAssetId"/>
@@ -689,11 +689,11 @@
       <field name="shipmentBoxTypeId" type="id-ne"></field>
       <field name="description" type="description"></field>
       <field name="dimensionUomId" type="id"></field>
-      <field name="boxLength" type="floating-point"></field>
-      <field name="boxWidth" type="floating-point"></field>
-      <field name="boxHeight" type="floating-point"></field>
+      <field name="boxLength" type="fixed-point"></field>
+      <field name="boxWidth" type="fixed-point"></field>
+      <field name="boxHeight" type="fixed-point"></field>
       <field name="weightUomId" type="id"></field>  
-      <field name="boxWeight" type="floating-point"></field>
+      <field name="boxWeight" type="fixed-point"></field>
       <prim-key field="shipmentBoxTypeId"/>
       <relation type="one" fk-name="SHMT_BXTP_DUOM" title="Dimension" rel-entity-name="Uom">
         <key-map field-name="dimensionUomId" rel-field-name="uomId"/>
@@ -749,13 +749,13 @@
       <field name="priceUomId" type="id"></field>
       <field name="priceUnitPrice" type="currency-amount"></field>
       <field name="orderFlatPrice" type="currency-amount"></field>
-      <field name="orderPricePercent" type="floating-point"></field>
+      <field name="orderPricePercent" type="fixed-point"></field>
       <field name="orderItemFlatPrice" type="currency-amount"></field>
-      <field name="shippingPricePercent" type="floating-point"></field>
+      <field name="shippingPricePercent" type="fixed-point"></field>
       <field name="productFeatureGroupId" type="id"></field>
-      <field name="oversizeUnit" type="floating-point"></field>
+      <field name="oversizeUnit" type="fixed-point"></field>
       <field name="oversizePrice" type="currency-amount"></field>
-      <field name="featurePercent" type="floating-point"></field>
+      <field name="featurePercent" type="fixed-point"></field>
       <field name="featurePrice" type="currency-amount"></field>
       <prim-key field="shipmentCostEstimateId"/>
       <relation type="one" fk-name="SHPMNT_CE_CSHMTH" rel-entity-name="CarrierShipmentMethod">
@@ -804,7 +804,7 @@
       <field name="shipmentId" type="id-ne"></field>
       <field name="shipmentItemSeqId" type="id-ne"></field>
       <field name="productId" type="id"></field>
-      <field name="quantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
       <field name="shipmentContentDescription" type="description"></field>
       <prim-key field="shipmentId"/>
       <prim-key field="shipmentItemSeqId"/>
@@ -1018,7 +1018,7 @@
       <field name="shipmentPackageSeqId" type="id-ne"></field>
       <field name="shipmentBoxTypeId" type="id"></field>
       <field name="dateCreated" type="date-time"></field>
-      <field name="weight" type="floating-point"></field>
+      <field name="weight" type="fixed-point"></field>
       <field name="weightUomId" type="id"></field>
       <field name="insuredValue" type="currency-amount"></field>
       <prim-key field="shipmentId"/>
@@ -1042,9 +1042,9 @@
       <field name="shipmentId" type="id-ne"></field>
       <field name="shipmentPackageSeqId" type="id-ne"></field>
       <field name="shipmentItemSeqId" type="id-ne"></field>
-      <field name="quantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
       <field name="subProductId" type="id"></field>
-      <field name="subProductQuantity" type="floating-point"></field>
+      <field name="subProductQuantity" type="fixed-point"></field>
       <prim-key field="shipmentId"/>
       <prim-key field="shipmentPackageSeqId"/>
       <prim-key field="shipmentItemSeqId"/>
@@ -1117,7 +1117,7 @@
       <field name="carrierDeliveryZone" type="short-varchar"></field>
       <field name="carrierRestrictionCodes" type="short-varchar"></field>
       <field name="carrierRestrictionDesc" type="very-long"></field>
-      <field name="billingWeight" type="floating-point"></field>
+      <field name="billingWeight" type="fixed-point"></field>
       <field name="billingWeightUomId" type="id"></field>
       <field name="actualTransportCost" type="currency-amount"></field>
       <field name="actualServiceCost" type="currency-amount"></field>

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/cost/CostServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/cost/CostServices.xml?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/cost/CostServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/cost/CostServices.xml Sun Nov 30 22:51:11 2008
@@ -99,8 +99,8 @@
         <filter-list-by-date list-name="otherCosts"/>
         <first-from-list list-name="otherCosts" entry-name="otherCost"/>
         
-        <set field="productCost" value="0" type="Double" />
-        <calculate field-name="productCost" type="Double" decimal-scale="6">
+        <set field="productCost" value="0" type="BigDecimal" />
+        <calculate field-name="productCost" type="BigDecimal" decimal-scale="6">
             <calcop field-name="laborCost.cost" operator="add">
                 <calcop field-name="materialsCost.cost" operator="get"/>
                 <calcop field-name="routeCost.cost" operator="get"/>
@@ -108,7 +108,7 @@
             </calcop>
         </calculate>
         <!-- if the cost is zero, and the product is a variant, get the cost of the virtual -->
-        <if-compare field="productCost" operator="equals" value="0" type="Double">
+        <if-compare field="productCost" operator="equals" value="0" type="BigDecimal">
             <entity-one entity-name="Product" value-name="product"/>
             <set from-field="product.productId" field="assocAndMap.productIdTo"/>
             <set value="PRODUCT_VARIANT" field="assocAndMap.productAssocTypeId"/>
@@ -125,7 +125,7 @@
             </if-not-empty>
         </if-compare>
         <!-- if the cost is zero, get the purchase cost from the SupplierProduct -->
-        <if-compare field="productCost" operator="equals" value="0" type="Double">
+        <if-compare field="productCost" operator="equals" value="0" type="BigDecimal">
             <set field="orderByList[]" value="+supplierPrefOrderId"/>
             <set field="orderByList[]" value="+lastPrice"/>
             <clear-field field-name="costsAndMap"/>
@@ -140,7 +140,7 @@
             <!-- if the cost is zero, get the purchase cost from the SupplierProduct
                  in a different currency and try to convert
             -->
-            <if-compare field="productCost" operator="equals" value="0" type="Double">
+            <if-compare field="productCost" operator="equals" value="0" type="BigDecimal">
                 <clear-field field-name="costsAndMap"/>
                 <set from-field="parameters.productId" field="costsAndMap.productId"/>
                 <set from-field="parameters.productPriceTypeId" field="costsAndMap.productPriceTypeId"/>
@@ -160,7 +160,7 @@
             </if-compare>
         </if-compare>
         <!--
-        <if-compare field="productCost" operator="equals" value="0" type="Double">
+        <if-compare field="productCost" operator="equals" value="0" type="BigDecimal">
             <clear-field field-name="costsAndMap"/>
             <set from-field="parameters.productId" field="costsAndMap.productId"/>
             <set from-field="parameters.currencyUomId" field="costsAndMap.currencyUomId"/>
@@ -184,7 +184,7 @@
             <result-to-field result-name="setupTime"/>
         </call-service>
 
-        <calculate field-name="estimatedTaskTime" type="Double" decimal-scale="6">
+        <calculate field-name="estimatedTaskTime" type="BigDecimal" decimal-scale="6">
             <calcop field-name="estimatedTaskTime" operator="subtract">
                 <calcop field-name="setupTime" operator="get"/>
             </calcop>
@@ -204,7 +204,7 @@
             <filter-list-by-date list-name="usageCosts"/>
             <first-from-list list-name="usageCosts" entry-name="usageCost"/>
         </if-not-empty>
-        <calculate field-name="taskCost" type="Double" decimal-scale="6">
+        <calculate field-name="taskCost" type="BigDecimal" decimal-scale="6">
             <calcop operator="add">
                 <calcop field-name="estimatedTaskTime" operator="multiply">
                     <calcop field-name="usageCost.amount" operator="get"/>
@@ -216,7 +216,7 @@
         </calculate>
 
         <!-- Time is converted from milliseconds to hours -->
-        <calculate field-name="taskCost" type="Double" decimal-scale="6">
+        <calculate field-name="taskCost" type="BigDecimal" decimal-scale="6">
             <calcop field-name="taskCost" operator="divide">
                 <number value="3600000"/>
             </calcop>
@@ -261,7 +261,7 @@
                 <call-service service-name="getProductCost" in-map-name="inputMap">
                     <result-to-field result-name="productCost"/>
                 </call-service>
-                <calculate field-name="totalProductsCost" type="Double" decimal-scale="6">
+                <calculate field-name="totalProductsCost" type="BigDecimal" decimal-scale="6">
                     <calcop field-name="totalProductsCost" operator="add">
                         <calcop field-name="componentMap.quantity" operator="multiply">
                             <calcop field-name="productCost" operator="get"/>
@@ -277,7 +277,7 @@
                 <call-service service-name="getProductCost" in-map-name="inputMap">
                     <result-to-field result-name="productCost"/>
                 </call-service>
-                <calculate field-name="totalProductsCost" type="Double" decimal-scale="6">
+                <calculate field-name="totalProductsCost" type="BigDecimal" decimal-scale="6">
                     <calcop field-name="productCost" operator="get"/>
                 </calculate>
             </else>
@@ -297,14 +297,14 @@
             <call-service service-name="getTaskCost" in-map-name="callSvcMap">
                 <result-to-field result-name="taskCost" field-name="taskCost"/>
             </call-service>
-            <calculate field-name="totalTaskCost" type="Double" decimal-scale="6">
+            <calculate field-name="totalTaskCost" type="BigDecimal" decimal-scale="6">
                 <calcop field-name="totalTaskCost" operator="add">
                     <calcop field-name="taskCost" operator="get"/>
                 </calcop>
             </calculate>
         </iterate>
         
-        <calculate field-name="totalCost" type="Double" decimal-scale="6">
+        <calculate field-name="totalCost" type="BigDecimal" decimal-scale="6">
             <calcop field-name="totalTaskCost" operator="add">
                 <calcop field-name="totalProductsCost" operator="get"/>
             </calcop>
@@ -312,7 +312,7 @@
         
         <!-- The CostComponent records are created. -->
         <if-not-empty field="totalTaskCost">
-            <if-compare field="totalTaskCost" operator="greater" value="0" type="Double">
+            <if-compare field="totalTaskCost" operator="greater" value="0" type="BigDecimal">
                 <clear-field field-name="callSvcMap"/>
                 <set value="${parameters.costComponentTypePrefix}_ROUTE_COST" field="callSvcMap.costComponentTypeId"/>
                 <set from-field="parameters.productId" field="callSvcMap.productId"/>
@@ -322,7 +322,7 @@
             </if-compare>
         </if-not-empty>
         <if-not-empty field="totalProductsCost">
-            <if-compare field="totalProductsCost" operator="greater" value="0" type="Double">
+            <if-compare field="totalProductsCost" operator="greater" value="0" type="BigDecimal">
                 <clear-field field-name="callSvcMap"/>
                 <set value="${parameters.costComponentTypePrefix}_MAT_COST" field="callSvcMap.costComponentTypeId"/>
                 <set from-field="parameters.productId" field="callSvcMap.productId"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryIssueServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryIssueServices.xml?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryIssueServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryIssueServices.xml Sun Nov 30 22:51:11 2008
@@ -38,7 +38,7 @@
                 </entity-count>
         
                 <!-- now go through each order item and call a service to issue the inventory -->
-                <if-compare field="iiCount" operator="greater" value="0" type="Double">
+                <if-compare field="iiCount" operator="greater" value="0" type="BigDecimal">
                     <iterate list-name="orderItemList" entry-name="orderItem">
                         <if-not-empty field="orderItem.productId">
                             <clear-field field-name="callSvcMap"/>
@@ -121,7 +121,7 @@
             </iterate>
             
             <!-- if quantityNotIssued is not 0, then pull it from the last non-serialized inventory item found, in the quantityNotIssued field -->
-            <if-compare field="parameters.quantityNotIssued" operator="not-equals" value="0" type="Double">
+            <if-compare field="parameters.quantityNotIssued" operator="not-equals" value="0" type="BigDecimal">
                 <if-not-empty field="lastNonSerInventoryItem">
                     <!-- create ItemIssuance record -->
                     <set field="issuanceCreateMap.orderId" from-field="parameters.orderId" />
@@ -138,10 +138,10 @@
                     <set field="createDetailMap.orderId" from-field="parameters.orderId" />
                     <set field="createDetailMap.orderItemSeqId" from-field="parameters.orderItemSeqId" />                                        
                     <set field="createDetailMap.itemIssuanceId" from-field="itemIssuanceId" />                    
-                    <calculate field-name="createDetailMap.availableToPromiseDiff" type="Double">
+                    <calculate field-name="createDetailMap.availableToPromiseDiff" type="BigDecimal">
                         <calcop field-name="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
-                    <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
+                    <calculate field-name="createDetailMap.quantityOnHandDiff" type="BigDecimal">
                         <calcop field-name="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
                     <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
@@ -173,10 +173,10 @@
                     <set field="createDetailMap.orderId" from-field="parameters.orderId" />
                     <set field="createDetailMap.orderItemSeqId" from-field="parameters.orderItemSeqId" />
                     <set field="createDetailMap.itemIssuanceId" from-field="itemIssuanceId" />
-                    <calculate field-name="createDetailMap.availableToPromiseDiff" type="Double">
+                    <calculate field-name="createDetailMap.availableToPromiseDiff" type="BigDecimal">
                         <calcop field-name="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
-                    <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
+                    <calculate field-name="createDetailMap.quantityOnHandDiff" type="BigDecimal">
                         <calcop field-name="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
                     <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
@@ -192,7 +192,7 @@
     </simple-method>
     <simple-method method-name="issueImmediateForInventoryItemInline" short-description="Does a issuance for one InventoryItem, meant to be called in-line">
         <!-- only do something with this inventoryItem if there is more inventory to issue -->
-        <if-compare field="parameters.quantityNotIssued" operator="greater" value="0" type="Double">
+        <if-compare field="parameters.quantityNotIssued" 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">
                     <!-- change status on inventoryItem -->
@@ -223,11 +223,11 @@
                                 <if-compare operator="equals" field="inventoryItem.statusId" value="INV_AVAILABLE"/>
                             </or>
                             <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.quantityNotIssued" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="Double">
+                        <if-compare-field field="parameters.quantityNotIssued" to-field="inventoryItem.availableToPromiseTotal" operator="greater" type="BigDecimal">
                             <set field="parameters.deductAmount" from-field="inventoryItem.availableToPromiseTotal" />
                         <else>
                             <set field="parameters.deductAmount" from-field="parameters.quantityNotIssued" />
@@ -249,10 +249,10 @@
                         <set field="createDetailMap.orderItemSeqId" from-field="parameters.orderItemSeqId" />
                         <set field="createDetailMap.itemIssuanceId" from-field="itemIssuanceId" />
                         <!-- update availableToPromiseDiff AND quantityOnHandDiff since this is an issuance -->
-                        <calculate field-name="createDetailMap.availableToPromiseDiff" type="Double">
+                        <calculate field-name="createDetailMap.availableToPromiseDiff" type="BigDecimal">
                             <calcop field-name="parameters.deductAmount" operator="negative"/>
                         </calculate>
-                        <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
+                        <calculate field-name="createDetailMap.quantityOnHandDiff" type="BigDecimal">
                             <calcop field-name="parameters.deductAmount" operator="negative"/>
                         </calculate>
                         <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml?rev=721986&r1=721985&r2=721986&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Sun Nov 30 22:51:11 2008
@@ -41,7 +41,7 @@
         <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="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-name="orderHeader"/>
 
@@ -100,7 +100,7 @@
                 </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-name="inventoryItemAndLocations">
                         <condition-list combine="and">
                             <condition-expr field-name="productId" env-name="parameters.productId"/>
@@ -121,7 +121,7 @@
                 </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-name="inventoryItems">
                         <condition-list combine="and">
                             <condition-expr field-name="productId" env-name="parameters.productId"/>
@@ -144,7 +144,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>
@@ -155,7 +155,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-name="createDetailMap.availableToPromiseDiff" type="Double">
+                            <calculate field-name="createDetailMap.availableToPromiseDiff" type="BigDecimal">
                                 <calcop field-name="parameters.quantityNotReserved" operator="negative"/>
                             </calculate>
                             <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
@@ -220,7 +220,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-name="createDetailMap.availableToPromiseDiff" type="Double">
+                            <calculate field-name="createDetailMap.availableToPromiseDiff" type="BigDecimal">
                                 <calcop field-name="parameters.quantityNotReserved" operator="negative"/>
                             </calculate>
                             <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
@@ -263,7 +263,7 @@
                         </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>
@@ -287,8 +287,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-name="parameters" to-map-name="cancelOrderItemShipGrpInvResMap" service-name="cancelOrderItemShipGrpInvRes"/>
@@ -308,7 +308,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">
@@ -335,7 +335,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"/>
@@ -369,7 +369,7 @@
 
     <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">
             <!-- get the promiseDatetime -->
             <get-related-one value-name="inventoryItem" relation-name="ProductFacility" to-value-name="productFacility"/>
             <set field="daysToShip" from-field="productFacility.daysToShip"/>
@@ -423,11 +423,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"/>
@@ -438,7 +438,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-name="createDetailMap.availableToPromiseDiff" type="Double">
+                        <calculate field-name="createDetailMap.availableToPromiseDiff" type="BigDecimal">
                             <calcop field-name="parameters.deductAmount" operator="negative"/>
                         </calculate>
                         <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
@@ -553,11 +553,11 @@
             <set from-field="parameters.shipGroupSeqId" field="oisgirListLookupMap.shipGroupSeqId"/>
             <find-by-and entity-name="OrderItemShipGrpInvRes" map-name="oisgirListLookupMap" list-name="oisgirList" use-cache="false"/>
             <iterate entry-name="oisgir" list-name="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>
 
@@ -604,7 +604,7 @@
             <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
             <clear-field field-name="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-name="orderItemShipGrpInvRes.quantity">
                     <calcop operator="subtract" field-name="orderItemShipGrpInvRes.quantity">
                         <calcop operator="get" field-name="cancelQuantity"/>