svn commit: r590578 - in /ofbiz/trunk/applications: order/src/org/ofbiz/order/order/OrderReadHelper.java order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java product/src/org/ofbiz/shipment/shipment/ShipmentServices.java

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

svn commit: r590578 - in /ofbiz/trunk/applications: order/src/org/ofbiz/order/order/OrderReadHelper.java order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java product/src/org/ofbiz/shipment/shipment/ShipmentServices.java

lektran
Author: lektran
Date: Wed Oct 31 00:30:41 2007
New Revision: 590578

URL: http://svn.apache.org/viewvc?rev=590578&view=rev
Log:
Gone back to using Double for the order quantity when getting a ship estimate, it's pulled from the database in a lot of places so it can't always be a BigDecimal for now.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=590578&r1=590577&r2=590578&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Wed Oct 31 00:30:41 2007
@@ -1222,7 +1222,7 @@
     public Map getItemInfoMap(GenericValue item) {
         Map itemInfo = FastMap.newInstance();
         itemInfo.put("productId", item.getString("productId"));
-        itemInfo.put("quantity", getOrderItemQuantity(item));
+        itemInfo.put("quantity", Double.valueOf(getOrderItemQuantity(item).doubleValue()));
         itemInfo.put("weight", new Double(this.getItemWeight(item).doubleValue()));
         itemInfo.put("size",  new Double(this.getItemSize(item)));
         itemInfo.put("piecesIncluded", new Long(this.getItemPiecesIncluded(item)));

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=590578&r1=590577&r2=590578&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Wed Oct 31 00:30:41 2007
@@ -2762,7 +2762,7 @@
             if (csii != null && csii.quantity > 0) {
                 if (item.shippingApplies()) {
                     Map itemInfo = item.getItemProductInfo();
-                    itemInfo.put("quantity", BigDecimal.valueOf(csii.quantity));
+                    itemInfo.put("quantity", Double.valueOf(csii.quantity));
                     itemInfos.add(itemInfo);
                 }
             }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=590578&r1=590577&r2=590578&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Wed Oct 31 00:30:41 2007
@@ -380,7 +380,7 @@
                 }
 
                 // add the feature quantities
-                BigDecimal quantity = (BigDecimal) itemMap.get("quantity");
+                Double quantity = (Double) itemMap.get("quantity");
                 Set featureSet = (Set) itemMap.get("featureSet");
                 if (featureSet != null && featureSet.size() > 0) {
                     Iterator fi = featureSet.iterator();