You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2007/09/17 10:10:32 UTC

svn commit: r576291 - in /ofbiz/trunk/applications: ecommerce/webapp/ecommerce/WEB-INF/actions/order/ ecommerce/webapp/ecommerce/cart/ order/src/org/ofbiz/order/order/ order/src/org/ofbiz/order/shoppingcart/ order/webapp/ordermgr/WEB-INF/actions/entry/...

Author: lektran
Date: Mon Sep 17 01:10:26 2007
New Revision: 576291

URL: http://svn.apache.org/viewvc?rev=576291&view=rev
Log:
Removed the following deprecated double methods and renamed their BigDecimal equivalents:
getOrderItemAdjustmentTotal
getOrderItemQuantity
calcOrderAdjustments
calcOrderAdjustment
getWorkEffortRentalQuantity

Modified:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/cart/showcart.ftl
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutreview.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
    ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh Mon Sep 17 01:10:26 2007
@@ -80,10 +80,10 @@
     headerAdjustmentsToShow = orderReadHelper.getOrderHeaderAdjustmentsToShow();
 
     orderShippingTotal = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, false, true);
-    orderShippingTotal += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true);
+    orderShippingTotal = orderShippingTotal.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true));
 
     orderTaxTotal = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, true, false);
-    orderTaxTotal += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false);
+    orderTaxTotal = orderTaxTotal.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false));
     
     placingCustomerOrderRoles = delegator.findByAnd("OrderRole",UtilMisc.toMap("orderId", orderId, "roleTypeId", roleTypeId));
     placingCustomerOrderRole = EntityUtil.getFirst(placingCustomerOrderRoles);        

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/cart/showcart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/cart/showcart.ftl?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/cart/showcart.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/cart/showcart.ftl Mon Sep 17 01:10:26 2007
@@ -336,7 +336,7 @@
                         <#if cartAdjustment.productPromoId?has_content><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDetails}</a></#if>:
                     </div>
                 </td>
-                <td nowrap align="right"><div class="tabletext"><@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustmentBd(cartAdjustment, shoppingCart.getSubTotal()) isoCode=shoppingCart.getCurrency()/></div></td>
+                <td nowrap align="right"><div class="tabletext"><@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(cartAdjustment, shoppingCart.getSubTotal()) isoCode=shoppingCart.getCurrency()/></div></td>
                 <td>&nbsp;</td>
               </tr>
             </#list>

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=576291&r1=576290&r2=576291&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 Mon Sep 17 01:10:26 2007
@@ -753,15 +753,15 @@
     }
 
     public BigDecimal getShippingTotal() {
-        return OrderReadHelper.calcOrderAdjustmentsBd(getOrderHeaderAdjustments(), getOrderItemsSubTotal(), false, false, true);
+        return OrderReadHelper.calcOrderAdjustments(getOrderHeaderAdjustments(), getOrderItemsSubTotal(), false, false, true);
     }
 
     public BigDecimal getHeaderTaxTotal() {
-        return OrderReadHelper.calcOrderAdjustmentsBd(getOrderHeaderAdjustments(), getOrderItemsSubTotal(), false, true, false);
+        return OrderReadHelper.calcOrderAdjustments(getOrderHeaderAdjustments(), getOrderItemsSubTotal(), false, true, false);
     }
 
     public BigDecimal getTaxTotal() {
-        return OrderReadHelper.calcOrderAdjustmentsBd(getAdjustments(), getOrderItemsSubTotal(), false, true, false);
+        return OrderReadHelper.calcOrderAdjustments(getAdjustments(), getOrderItemsSubTotal(), false, true, false);
     }
 
     public Set getItemFeatureSet(GenericValue item) {
@@ -966,7 +966,7 @@
                 }
                 if (product != null) {
                     if (ProductWorker.shippingApplies(product)) {
-                        shippableQuantity = shippableQuantity.add(getOrderItemQuantityBd(item)).setScale(scale, rounding);
+                        shippableQuantity = shippableQuantity.add(getOrderItemQuantity(item)).setScale(scale, rounding);
                     }
                 }
             }
@@ -981,7 +981,7 @@
             Iterator i = validItems.iterator();
             while (i.hasNext()) {
                 GenericValue item = (GenericValue) i.next();
-                shippableWeight = shippableWeight.add(this.getItemWeight(item).multiply( getOrderItemQuantityBd(item))).setScale(scale, rounding);
+                shippableWeight = shippableWeight.add(this.getItemWeight(item).multiply( getOrderItemQuantity(item))).setScale(scale, rounding);
             }
         }
 
@@ -1331,7 +1331,7 @@
     }
 
     public BigDecimal getOrderAdjustmentTotal(GenericValue adjustment) {
-        return calcOrderAdjustmentBd(adjustment, getOrderItemsSubTotal());
+        return calcOrderAdjustment(adjustment, getOrderItemsSubTotal());
     }
 
     public int hasSurvey() {
@@ -2095,7 +2095,7 @@
         for (int i = 0; i < orderItems.size(); i++) {
             GenericValue oi = (GenericValue) orderItems.get(i);
 
-            totalItems = totalItems.add(getOrderItemQuantityBd(oi)).setScale(scale, rounding);
+            totalItems = totalItems.add(getOrderItemQuantity(oi)).setScale(scale, rounding);
         }
         return totalItems.setScale(scale, rounding);
     }
@@ -2144,15 +2144,10 @@
         return getOrderItemAdjustmentsTotal(orderItem, true, false, false);
     }
 
-    public BigDecimal getOrderItemAdjustmentTotalBd(GenericValue orderItem, GenericValue adjustment) {
+    public BigDecimal getOrderItemAdjustmentTotal(GenericValue orderItem, GenericValue adjustment) {
         return calcItemAdjustmentBd(adjustment, orderItem);
     }
 
-    /** @deprecated */
-    public double getOrderItemAdjustmentTotal(GenericValue orderItem, GenericValue adjustment) {
-        return getOrderItemAdjustmentTotalBd(orderItem, adjustment).doubleValue();
-    }
-
     public String getAdjustmentType(GenericValue adjustment) {
         GenericValue adjustmentType = null;
         try {
@@ -2223,7 +2218,7 @@
         return orderHeader;
     }
 
-    public static BigDecimal getOrderItemQuantityBd(GenericValue orderItem) {
+    public static BigDecimal getOrderItemQuantity(GenericValue orderItem) {
 
         BigDecimal cancelQty = orderItem.getBigDecimal("cancelQuantity");
         BigDecimal orderQty = orderItem.getBigDecimal("quantity");
@@ -2234,11 +2229,6 @@
         return orderQty.subtract(cancelQty).setScale(scale, rounding);
     }
 
-    /** @deprecated */
-    public static Double getOrderItemQuantity(GenericValue orderItem) {
-        return new Double(getOrderItemQuantityBd(orderItem).doubleValue());
-    }
-
     public static Double getOrderItemShipGroupQuantity(GenericValue shipGroupAssoc) {
         Double cancelQty = shipGroupAssoc.getDouble("cancelQuantity");
         Double orderQty = shipGroupAssoc.getDouble("quantity");
@@ -2318,7 +2308,7 @@
     }
 
     public static BigDecimal getOrderAdjustmentsTotal(List orderItems, List adjustments) {
-        return calcOrderAdjustmentsBd(getOrderHeaderAdjustments(adjustments, null), getOrderItemsSubTotal(orderItems, adjustments), true, true, true);
+        return calcOrderAdjustments(getOrderHeaderAdjustments(adjustments, null), getOrderItemsSubTotal(orderItems, adjustments), true, true, true);
     }
 
     public static List getOrderSurveyResponses(GenericValue orderHeader) {
@@ -2356,7 +2346,7 @@
 
     // ================= Order Adjustments =================
 
-    public static BigDecimal calcOrderAdjustmentsBd(List orderHeaderAdjustments, BigDecimal subTotal, boolean includeOther, boolean includeTax, boolean includeShipping) {
+    public static BigDecimal calcOrderAdjustments(List orderHeaderAdjustments, BigDecimal subTotal, boolean includeOther, boolean includeTax, boolean includeShipping) {
         BigDecimal adjTotal = ZERO;
 
         if (orderHeaderAdjustments != null && orderHeaderAdjustments.size() > 0) {
@@ -2366,18 +2356,13 @@
             while (adjIt.hasNext()) {
                 GenericValue orderAdjustment = (GenericValue) adjIt.next();
 
-                adjTotal = adjTotal.add(OrderReadHelper.calcOrderAdjustmentBd(orderAdjustment, subTotal)).setScale(scale, rounding);
+                adjTotal = adjTotal.add(OrderReadHelper.calcOrderAdjustment(orderAdjustment, subTotal)).setScale(scale, rounding);
             }
         }
         return adjTotal.setScale(scale, rounding);
     }
 
-    /** @deprecated */
-    public static double calcOrderAdjustments(List orderHeaderAdjustments, double subTotal, boolean includeOther, boolean includeTax, boolean includeShipping) {
-        return calcOrderAdjustmentsBd(orderHeaderAdjustments, new BigDecimal(subTotal), includeOther, includeTax, includeShipping).doubleValue();
-    }
-
-    public static BigDecimal calcOrderAdjustmentBd(GenericValue orderAdjustment, BigDecimal orderSubTotal) {
+    public static BigDecimal calcOrderAdjustment(GenericValue orderAdjustment, BigDecimal orderSubTotal) {
         BigDecimal adjustment = ZERO;
 
         if (orderAdjustment.get("amount") != null) {
@@ -2394,11 +2379,6 @@
         return adjustment.setScale(scale, rounding);
     }
 
-    /** @deprecated */
-    public static double calcOrderAdjustment(GenericValue orderAdjustment, double orderSubTotal) {
-        return calcOrderAdjustmentBd(orderAdjustment, new BigDecimal(orderSubTotal)).doubleValue();
-    }
-
     // ================= Order Item Adjustments =================
     public static BigDecimal getOrderItemsSubTotal(List orderItems, List adjustments) {
         return getOrderItemsSubTotal(orderItems, adjustments, null);
@@ -2418,7 +2398,7 @@
                 while (weIter != null && weIter.hasNext()) {
                     GenericValue workEffort = (GenericValue) weIter.next();
                     if (workEffort.getString("workEffortId").compareTo(orderItem.getString("orderItemSeqId")) == 0)    {
-                        itemTotal = itemTotal.multiply(getWorkEffortRentalQuantityBd(workEffort)).setScale(scale, rounding);
+                        itemTotal = itemTotal.multiply(getWorkEffortRentalQuantity(workEffort)).setScale(scale, rounding);
                         break;
                     }
 //                    Debug.log("Item : " + orderItem.getString("orderId") + " / " + orderItem.getString("orderItemSeqId") + " = " + itemTotal, module);
@@ -2438,7 +2418,7 @@
     /** The passed adjustments can be all adjustments for the order, ie for all line items */
     public static BigDecimal getOrderItemSubTotal(GenericValue orderItem, List adjustments, boolean forTax, boolean forShipping) {
         BigDecimal unitPrice = orderItem.getBigDecimal("unitPrice");
-        BigDecimal quantity = getOrderItemQuantityBd(orderItem);
+        BigDecimal quantity = getOrderItemQuantity(orderItem);
         BigDecimal result = ZERO;
 
         if (unitPrice == null || quantity == null) {
@@ -2460,7 +2440,7 @@
                     try {
                         workEffort = WorkOrderItemFulfillment.getRelatedOneCache("WorkEffort");
                     } catch (GenericEntityException e) {}
-                    result = result.multiply(getWorkEffortRentalQuantityBd(workEffort));
+                    result = result.multiply(getWorkEffortRentalQuantity(workEffort));
                 }
             }
         }
@@ -2494,7 +2474,7 @@
         return length;
         }
     
-    public static BigDecimal getWorkEffortRentalQuantityBd(GenericValue workEffort){
+    public static BigDecimal getWorkEffortRentalQuantity(GenericValue workEffort){
         BigDecimal persons = new BigDecimal(1);
         if (workEffort.get("reservPersons") != null)
             persons = workEffort.getBigDecimal("reservPersons");
@@ -2527,11 +2507,6 @@
         return rentalAdjustment; // return total rental adjustment
         }
 
-    /** @deprecated */
-    public static double getWorkEffortRentalQuantity(GenericValue workEffort) {
-        return getWorkEffortRentalQuantityBd(workEffort).doubleValue();
-    }
-
     public static BigDecimal getAllOrderItemsAdjustmentsTotalBd(List orderItems, List adjustments, boolean includeOther, boolean includeTax, boolean includeShipping) {
         BigDecimal result = ZERO;
         Iterator itemIter = UtilMisc.toIterator(orderItems);
@@ -2554,7 +2529,7 @@
 
     /** The passed adjustments can be all adjustments for the order, ie for all line items */
     public static BigDecimal getOrderItemAdjustmentsTotal(GenericValue orderItem, List adjustments, boolean includeOther, boolean includeTax, boolean includeShipping, boolean forTax, boolean forShipping) {
-        return calcItemAdjustmentsBd(getOrderItemQuantityBd(orderItem), orderItem.getBigDecimal("unitPrice"),
+        return calcItemAdjustmentsBd(getOrderItemQuantity(orderItem), orderItem.getBigDecimal("unitPrice"),
                 getOrderItemAdjustmentList(orderItem, adjustments),
                 includeOther, includeTax, includeShipping, forTax, forShipping);
     }
@@ -2608,7 +2583,7 @@
     }
 
     public static BigDecimal calcItemAdjustmentBd(GenericValue itemAdjustment, GenericValue item) {
-        return calcItemAdjustmentBd(itemAdjustment, getOrderItemQuantityBd(item), item.getBigDecimal("unitPrice"));
+        return calcItemAdjustmentBd(itemAdjustment, getOrderItemQuantity(item), item.getBigDecimal("unitPrice"));
     }
 
     /** @deprecated */

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Sep 17 01:10:26 2007
@@ -1338,7 +1338,7 @@
                     BigDecimal orderSubTotal = OrderReadHelper.getOrderItemsSubTotal(validOrderItems, allAdjustments);
 
                     // shipping amount
-                    BigDecimal orderShipping = OrderReadHelper.calcOrderAdjustmentsBd(orderHeaderAdjustments, orderSubTotal, false, false, true);
+                    BigDecimal orderShipping = OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true);
 
                     // build up the list of tax calc service parameters
                     for (int i = 0; i < validOrderItems.size(); i++) {
@@ -1541,7 +1541,7 @@
                 }
 
                 BigDecimal currentShipping = OrderReadHelper.getAllOrderItemsAdjustmentsTotalBd(orh.getOrderItemAndShipGroupAssoc(shipGroupSeqId), orh.getAdjustments(), false, false, true);
-                currentShipping = currentShipping.add(OrderReadHelper.calcOrderAdjustmentsBd(orh.getOrderHeaderAdjustments(shipGroupSeqId), orh.getOrderItemsSubTotal(), false, false, true));
+                currentShipping = currentShipping.add(OrderReadHelper.calcOrderAdjustments(orh.getOrderHeaderAdjustments(shipGroupSeqId), orh.getOrderItemsSubTotal(), false, false, true));
 
                 if (Debug.infoOn()) {
                     Debug.log("Old Shipping Total [" + orderId + " / " + shipGroupSeqId + "] : " + currentShipping, module);
@@ -2487,7 +2487,7 @@
             BigDecimal orderSubTotal = orh.getOrderItemsSubTotal();
 
             BigDecimal shippingAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotalBd(orderItems, orderAdjustments, false, false, true);
-            shippingAmount = shippingAmount.add(OrderReadHelper.calcOrderAdjustmentsBd(orderHeaderAdjustments, orderSubTotal, false, false, true));
+            shippingAmount = shippingAmount.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true));
 
             result = ServiceUtil.returnSuccess();
             result.put("shippingAmount", shippingAmount);

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=576291&r1=576290&r2=576291&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 Mon Sep 17 01:10:26 2007
@@ -1859,7 +1859,7 @@
 
     /** Returns the order level shipping amount */
     public BigDecimal getOrderShipping() {
-        return OrderReadHelper.calcOrderAdjustmentsBd(this.getAdjustments(), new BigDecimal(this.getSubTotal()), false, false, true);
+        return OrderReadHelper.calcOrderAdjustments(this.getAdjustments(), new BigDecimal(this.getSubTotal()), false, false, true);
     }
 
     // ----------------------------------------
@@ -2456,7 +2456,7 @@
     }
 
     public double getOrderOtherAdjustmentTotal() {
-        return OrderReadHelper.calcOrderAdjustmentsBd(this.getAdjustments(), new BigDecimal(this.getSubTotal()), true, false, false).doubleValue();
+        return OrderReadHelper.calcOrderAdjustments(this.getAdjustments(), new BigDecimal(this.getSubTotal()), true, false, false).doubleValue();
     }
 
     /** Returns the sub-total in the cart (item-total - discount). */
@@ -3346,7 +3346,7 @@
                     /*
                     if ((productPromoAction.get("productId") == null || productPromoAction.getString("productId").equals(this.getShipmentMethodTypeId())) &&
                         (productPromoAction.get("partyId") == null || productPromoAction.getString("partyId").equals(this.getCarrierPartyId()))) {
-                        Double shippingAmount = new Double(OrderReadHelper.calcOrderAdjustmentBd(orderAdjustment, new BigDecimal(getSubTotal())).negate().doubleValue());
+                        Double shippingAmount = new Double(OrderReadHelper.calcOrderAdjustment(orderAdjustment, new BigDecimal(getSubTotal())).negate().doubleValue());
                         // always set orderAdjustmentTypeId to SHIPPING_CHARGES for free shipping adjustments
                         GenericValue fsOrderAdjustment = getDelegator().makeValue("OrderAdjustment",
                                 UtilMisc.toMap("orderItemSeqId", orderAdjustment.get("orderItemSeqId"), "orderAdjustmentTypeId", "SHIPPING_CHARGES", "amount", shippingAmount,
@@ -4265,7 +4265,7 @@
             BigDecimal taxTotal = ZERO;
             for (int i = 0; i < shipTaxAdj.size(); i++) {
                 GenericValue v = (GenericValue) shipTaxAdj.get(i);
-                taxTotal = taxTotal.add(OrderReadHelper.calcOrderAdjustmentBd(v, new BigDecimal(cart.getSubTotal())));
+                taxTotal = taxTotal.add(OrderReadHelper.calcOrderAdjustment(v, new BigDecimal(cart.getSubTotal())));
             }
 
             Iterator iter = shipItemInfo.values().iterator();

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutreview.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutreview.bsh?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutreview.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutreview.bsh Mon Sep 17 01:10:26 2007
@@ -133,11 +133,11 @@
 context.put("localOrderReadHelper", orh);
 
 shippingAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, false, true);
-shippingAmount += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true);
+shippingAmount = shippingAmount.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true));
 context.put("orderShippingTotal", shippingAmount);
 
 taxAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, true, false);
-taxAmount += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false);
+taxAmount = taxAmount.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false));
 context.put("orderTaxTotal", taxAmount);   
 context.put("orderGrandTotal", OrderReadHelper.getOrderGrandTotal(orderItems, orderAdjustments));
               

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh Mon Sep 17 01:10:26 2007
@@ -98,11 +98,11 @@
     context.put("otherAdjAmount", otherAdjAmount);
 
     shippingAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, false, true);
-    shippingAmount += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true);
+    shippingAmount = shippingAmount.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true));
     context.put("shippingAmount", shippingAmount);
 
     taxAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, true, false);
-    taxAmount += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false);
+    taxAmount = taxAmount.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false));
     context.put("taxAmount", taxAmount);
 
     grandTotal = OrderReadHelper.getOrderGrandTotal(orderItems, orderAdjustments);

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl Mon Sep 17 01:10:26 2007
@@ -268,7 +268,7 @@
                     <#if cartAdjustment.productPromoId?has_content><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDetails}</a></#if>:
                   </div>
                 </td>
-                <td nowrap align="right"><div class="tabletext"><@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustmentBd(cartAdjustment, shoppingCart.getSubTotal()) isoCode=currencyUomId/></div></td>
+                <td nowrap align="right"><div class="tabletext"><@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(cartAdjustment, shoppingCart.getSubTotal()) isoCode=currencyUomId/></div></td>
                 <td>&nbsp;</td>
               </tr>
             </#list>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl Mon Sep 17 01:10:26 2007
@@ -244,7 +244,7 @@
         </#if>
         <#list orderHeaderAdjustments as orderHeaderAdjustment>
             <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType")>
-            <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustmentBd(orderHeaderAdjustment, orderSubTotal)>
+            <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)>
             <#assign orderAdjustmentId = orderHeaderAdjustment.get("orderAdjustmentId")>
             <#if adjustmentAmount != 0>
                 <form name="updateOrderAdjustmentForm${orderAdjustmentId}" method="post" action="<@o...@ofbizUrl>">

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl Mon Sep 17 01:10:26 2007
@@ -69,7 +69,7 @@
            </#list>
           <#list orderHeaderAdjustments as orderHeaderAdjustment>
             <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType")>
-            <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustmentBd(orderHeaderAdjustment, orderSubTotal)>
+            <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)>
             <#if adjustmentAmount != 0>
             <fo:table-row>
                <fo:table-cell></fo:table-cell>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl Mon Sep 17 01:10:26 2007
@@ -505,7 +505,7 @@
           <tr><td colspan="7"><hr class="sepbar"/></td></tr>
           <#list orderHeaderAdjustments as orderHeaderAdjustment>
             <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType")>
-            <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustmentBd(orderHeaderAdjustment, orderSubTotal)>
+            <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)>
             <#if adjustmentAmount != 0>
               <tr>
                 <td align="right" colspan="5">					

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=576291&r1=576290&r2=576291&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Mon Sep 17 01:10:26 2007
@@ -485,6 +485,7 @@
 
         <if-empty field-name="estimatedShipCost" map-name="shipment">
             <call-bsh><![CDATA[
+                    import java.math.BigDecimal;
                     import org.ofbiz.order.order.OrderReadHelper;
 
                     orderReadHelper = new OrderReadHelper(orderHeader);
@@ -494,7 +495,7 @@
                     orderSubTotal = orderReadHelper.getOrderItemsSubTotal();
 
                     shippingAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, false, true);
-                    shippingAmount += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true);
+                    shippingAmount = shippingAmount.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true));
                     //org.ofbiz.base.util.Debug.log("shippingAmmount=" + shippingAmount);
                     shipment.put("estimatedShipCost", shippingAmount);
             ]]></call-bsh>