svn commit: r560628 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

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

svn commit: r560628 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

lektran
Author: lektran
Date: Sat Jul 28 14:49:55 2007
New Revision: 560628

URL: http://svn.apache.org/viewvc?view=rev&rev=560628
Log:
ShoppingCart.getOrderShipping now calls the BigDecimal version of calcOrderAdjustments and also returns a BigDecimal.  No other changes required as nothing actually uses this method.
Part of OFBIZ-880

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

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?view=diff&rev=560628&r1=560627&r2=560628
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sat Jul 28 14:49:55 2007
@@ -1456,7 +1456,7 @@
                 // this payment method will set the billing address for the order;
                 // before it is set we have to verify if the billing address is
                 // compatible with the ProductGeos
-                Iterator products = (this.getItemsProducts(this.cartLines)).iterator();
+                Iterator products = (ShoppingCart.getItemsProducts(this.cartLines)).iterator();
                 while (products.hasNext()) {
                     GenericValue product = (GenericValue)products.next();
                     if (!ProductWorker.isBillableToAddress(product, billingAddress)) {
@@ -1838,8 +1838,8 @@
     // =======================================================================
 
     /** Returns the order level shipping amount */
-    public double getOrderShipping() {
-        return OrderReadHelper.calcOrderAdjustments(this.getAdjustments(), this.getSubTotal(), false, false, true);
+    public BigDecimal getOrderShipping() {
+        return OrderReadHelper.calcOrderAdjustmentsBd(this.getAdjustments(), new BigDecimal(this.getSubTotal()), false, false, true);
     }
 
     // ----------------------------------------