svn commit: r602570 - in /ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart: ShoppingCart.java shipping/ShippingEvents.java

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

svn commit: r602570 - in /ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart: ShoppingCart.java shipping/ShippingEvents.java

jleroux@apache.org
Author: jleroux
Date: Sat Dec  8 14:40:53 2007
New Revision: 602570

URL: http://svn.apache.org/viewvc?rev=602570&view=rev
Log:
I, like most people, do not like to see warnings in a release.

Modified:
    ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java

Modified: ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=602570&r1=602569&r2=602570&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sat Dec  8 14:40:53 2007
@@ -1804,7 +1804,7 @@
 
     /** Returns the order level shipping amount */
     public double getOrderShipping() {
-        return OrderReadHelper.calcOrderAdjustments(this.getAdjustments(), this.getSubTotal(), false, false, true);
+        return OrderReadHelper.calcOrderAdjustmentsBd(this.getAdjustments(), new BigDecimal(this.getSubTotal()), false, false, true).doubleValue();
     }
 
     // ----------------------------------------
@@ -4088,7 +4088,7 @@
             double taxTotal = 0.00;
             for (int i = 0; i < shipTaxAdj.size(); i++) {
                 GenericValue v = (GenericValue) shipTaxAdj.get(i);
-                taxTotal += OrderReadHelper.calcOrderAdjustment(v, cart.getSubTotal());
+                taxTotal += OrderReadHelper.calcOrderAdjustmentBd(v, new BigDecimal(cart.getSubTotal())).doubleValue();
             }
 
             Iterator iter = shipItemInfo.values().iterator();
@@ -4110,7 +4110,7 @@
 
                 for (int i = 0; i < itemTaxAdj.size(); i++) {
                     GenericValue v = (GenericValue) itemTaxAdj.get(i);
-                    itemTax += OrderReadHelper.calcItemAdjustment(v, new Double(quantity), new Double(item.getBasePrice()));
+                    itemTax += OrderReadHelper.calcItemAdjustmentBd(v, new BigDecimal(quantity), new BigDecimal(item.getBasePrice())).doubleValue();
                 }
 
                 return itemTax;

Modified: ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java?rev=602570&r1=602569&r2=602570&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java (original)
+++ ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java Sat Dec  8 14:40:53 2007
@@ -106,8 +106,8 @@
 
         String contactMechId = shipAddr.getString("contactMechId");
         return getShipGroupEstimate(dispatcher, delegator, orh.getOrderTypeId(), shipmentMethodTypeId, carrierPartyId, carrierRoleTypeId,
-                contactMechId, orh.getProductStoreId(), orh.getShippableItemInfo(shipGroupSeqId), orh.getShippableWeight(shipGroupSeqId),
-                orh.getShippableQuantity(shipGroupSeqId), orh.getShippableTotal(shipGroupSeqId));
+                contactMechId, orh.getProductStoreId(), orh.getShippableItemInfo(shipGroupSeqId), orh.getShippableWeightBd(shipGroupSeqId).doubleValue(),
+                orh.getShippableQuantityBd(shipGroupSeqId).doubleValue(), orh.getShippableTotalBd(shipGroupSeqId).doubleValue());
     }
 
     public static Map getShipGroupEstimate(LocalDispatcher dispatcher, GenericDelegator delegator, String orderTypeId,