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/16 02:48:10 UTC

svn commit: r576013 - in /ofbiz/trunk/applications: accounting/src/org/ofbiz/accounting/payment/ accounting/webapp/accounting/WEB-INF/actions/transaction/ ecommerce/webapp/ecommerce/WEB-INF/actions/order/ order/src/org/ofbiz/order/order/ order/webapp/o...

Author: lektran
Date: Sat Sep 15 17:48:08 2007
New Revision: 576013

URL: http://svn.apache.org/viewvc?rev=576013&view=rev
Log:
Removed deprecated getOrderGrandTotal() and renamed getOrderGrandTotalBd()

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.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/return/returnItemInc.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/task/ordertasklist.ftl

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java?rev=576013&r1=576012&r2=576013&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java Sat Sep 15 17:48:08 2007
@@ -190,7 +190,7 @@
             while (ohi.hasNext()) {
                 GenericValue orderHeader = (GenericValue) ohi.next();
                 OrderReadHelper orh = new OrderReadHelper(orderHeader);
-                balance = balance.add(orh.getOrderGrandTotalBd());
+                balance = balance.add(orh.getOrderGrandTotal());
             }
         }
 

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=576013&r1=576012&r2=576013&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Sat Sep 15 17:48:08 2007
@@ -110,7 +110,7 @@
         OrderReadHelper orh = new OrderReadHelper(orderHeader);
 
         // get the total remaining
-        BigDecimal orderGrandTotal = orh.getOrderGrandTotalBd();
+        BigDecimal orderGrandTotal = orh.getOrderGrandTotal();
         orderGrandTotal = orderGrandTotal.setScale(decimals, rounding);
         double totalRemaining = orderGrandTotal.doubleValue();
 
@@ -329,7 +329,7 @@
 
         // get the order amounts
         OrderReadHelper orh = new OrderReadHelper(orderHeader);
-        BigDecimal orderGrandTotal = orh.getOrderGrandTotalBd();
+        BigDecimal orderGrandTotal = orh.getOrderGrandTotal();
         orderGrandTotal = orderGrandTotal.setScale(decimals, rounding);
         double totalRemaining = orderGrandTotal.doubleValue();
 
@@ -1058,7 +1058,7 @@
         // Check if the outstanding amount for the order is greater than the
         // amount that we are going to capture.
         OrderReadHelper orh = new OrderReadHelper(orderHeader);
-        BigDecimal orderGrandTotal = orh.getOrderGrandTotalBd();
+        BigDecimal orderGrandTotal = orh.getOrderGrandTotal();
         orderGrandTotal = orderGrandTotal.setScale(decimals, rounding);
         BigDecimal totalPayments = PaymentWorker.getPaymentsTotal(orh.getOrderPayments());
         totalPayments = totalPayments.setScale(decimals, rounding);

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh?rev=576013&r1=576012&r2=576013&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh Sat Sep 15 17:48:08 2007
@@ -33,7 +33,7 @@
 if(orderHeader != null){
    orh = new OrderReadHelper(orderHeader);
    context.put("orh", orh);
-   context.put("overrideAmount", new Double(orh.getOrderGrandTotalBd().doubleValue()));
+   context.put("overrideAmount", new Double(orh.getOrderGrandTotal().doubleValue()));
 }
 
 if(orderPaymentPreferenceId != null){

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=576013&r1=576012&r2=576013&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 Sat Sep 15 17:48:08 2007
@@ -175,7 +175,7 @@
 
     context.put("orderShippingTotal", orderShippingTotal);
     context.put("orderTaxTotal", orderTaxTotal);   
-    context.put("orderGrandTotal", OrderReadHelper.getOrderGrandTotalBd(orderItems, orderAdjustments));
+    context.put("orderGrandTotal", OrderReadHelper.getOrderGrandTotal(orderItems, orderAdjustments));
     context.put("placingCustomerPerson", placingCustomerPerson);
 
     context.put("billingAccount", billingAccount);

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=576013&r1=576012&r2=576013&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 Sat Sep 15 17:48:08 2007
@@ -1257,18 +1257,13 @@
         return emails.toString();
     }
 
-    public BigDecimal getOrderGrandTotalBd() {
+    public BigDecimal getOrderGrandTotal() {
         if (totalPrice == null) {
             totalPrice = getOrderGrandTotalBd(getValidOrderItems(), getAdjustments());
         }// else already set
         return totalPrice;
     }
 
-    /** @deprecated Use getOrderGrandTotalBd() instead */
-    public double getOrderGrandTotal() {
-        return getOrderGrandTotalBd().doubleValue();
-    }
-
     /**
      * Gets the amount open on the order that is not covered by the relevant OrderPaymentPreferences.
      * This works by adding up the amount allocated to each unprocessed OrderPaymentPreference and the
@@ -1276,7 +1271,7 @@
      */
     public double getOrderOpenAmount() throws GenericEntityException {
         GenericDelegator delegator = orderHeader.getDelegator();
-        BigDecimal total = getOrderGrandTotalBd();
+        BigDecimal total = getOrderGrandTotal();
         double openAmount = 0;
         List prefs = getPaymentPreferences();
 
@@ -2385,15 +2380,10 @@
         return productStore;
     }
 
-    public static BigDecimal getOrderGrandTotalBd(List orderItems, List adjustments) {
+    public static BigDecimal getOrderGrandTotal(List orderItems, List adjustments) {
         BigDecimal total = getOrderItemsTotalBd(orderItems, adjustments);
         BigDecimal adj = getOrderAdjustmentsTotalBd(orderItems, adjustments);
         return total.add(adj).setScale(scale,rounding);
-    }
-
-    /** @deprecated */
-    public static double getOrderGrandTotal(List orderItems, List adjustments) {
-        return getOrderGrandTotalBd(orderItems, adjustments).doubleValue();
     }
 
     public static List getOrderHeaderAdjustments(List adjustments, String shipGroupSeqId) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=576013&r1=576012&r2=576013&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Sat Sep 15 17:48:08 2007
@@ -114,7 +114,7 @@
             countNewReturnItems = Boolean.FALSE;
         }
         BigDecimal returnTotal = orh.getOrderReturnedTotalBd(countNewReturnItems.booleanValue());
-        BigDecimal orderTotal = orh.getOrderGrandTotalBd();
+        BigDecimal orderTotal = orh.getOrderGrandTotal();
         BigDecimal available = orderTotal.subtract(returnTotal).subtract(adj);
 
 
@@ -1990,7 +1990,7 @@
                     return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "OrderReturnTotalCannotLessThanZero", locale));
                 }
                 OrderReadHelper helper = new OrderReadHelper(OrderReadHelper.getOrderHeader(delegator, orderId));
-                BigDecimal grandTotal = helper.getOrderGrandTotalBd();
+                BigDecimal grandTotal = helper.getOrderGrandTotal();
                 if (returnAmount == null) {
                     Debug.logInfo("No returnAmount found for order:" + orderId, module);
                 } else {

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=576013&r1=576012&r2=576013&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 Sat Sep 15 17:48:08 2007
@@ -1177,7 +1177,7 @@
             BigDecimal currentSubTotal = orderHeader.getBigDecimal("remainingSubTotal");
 
             // get the new grand total
-            BigDecimal updatedTotal = orh.getOrderGrandTotalBd();
+            BigDecimal updatedTotal = orh.getOrderGrandTotal();
 
             // calculate subTotal as grandTotal - returnsTotal - (tax + shipping of items not returned)
             BigDecimal remainingSubTotal = updatedTotal.subtract(orh.getOrderReturnedTotalBd()).subtract(orh.getOrderNonReturnedTaxAndShippingBd());
@@ -3572,7 +3572,7 @@
             try {
                 Debug.log("Calling process payments...", module);
                 //Debug.set(Debug.VERBOSE, true);
-                paymentResp = CheckOutHelper.processPayment(orderId, orh.getOrderGrandTotalBd().doubleValue(), orh.getCurrency(), productStore, userLogin, false, false, dispatcher, delegator);
+                paymentResp = CheckOutHelper.processPayment(orderId, orh.getOrderGrandTotal().doubleValue(), orh.getCurrency(), productStore, userLogin, false, false, dispatcher, delegator);
                 //Debug.set(Debug.VERBOSE, false);
             } catch (GeneralException e) {
                 Debug.logError(e, module);

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=576013&r1=576012&r2=576013&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 Sat Sep 15 17:48:08 2007
@@ -139,7 +139,7 @@
 taxAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, true, false);
 taxAmount += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false);
 context.put("orderTaxTotal", taxAmount);   
-context.put("orderGrandTotal", OrderReadHelper.getOrderGrandTotalBd(orderItems, orderAdjustments));
+context.put("orderGrandTotal", OrderReadHelper.getOrderGrandTotal(orderItems, orderAdjustments));
               
 orderName = cart.getOrderName();
 context.put("orderName", orderName);

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=576013&r1=576012&r2=576013&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 Sat Sep 15 17:48:08 2007
@@ -105,7 +105,7 @@
     taxAmount += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false);
     context.put("taxAmount", taxAmount);
 
-    grandTotal = OrderReadHelper.getOrderGrandTotalBd(orderItems, orderAdjustments);
+    grandTotal = OrderReadHelper.getOrderGrandTotal(orderItems, orderAdjustments);
     context.put("grandTotal", grandTotal);
 
     orderItemList = orderReadHelper.getOrderItems();

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl?rev=576013&r1=576012&r2=576013&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl Sat Sep 15 17:48:08 2007
@@ -33,7 +33,7 @@
                 <table border='0' width='100%' cellpadding='2' cellspacing='0'>
                   <tr>
                     <td class="tabletext" width="25%">${uiLabelMap.OrderOrderTotal}</td>
-                    <td class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotalBd() isoCode=orh.getCurrency()/></td>
+                    <td class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotal() isoCode=orh.getCurrency()/></td>
                   </tr>  
                   <tr>
                     <td class="tabletext" width="25%">${uiLabelMap.OrderAmountAlreadyCredited}</td>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl?rev=576013&r1=576012&r2=576013&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl Sat Sep 15 17:48:08 2007
@@ -89,7 +89,7 @@
       <table border='0' width='100%' cellpadding='2' cellspacing='0'>
         <tr>
           <td class="tabletext" width="25%">${uiLabelMap.OrderOrderTotal}</td>
-          <td class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotalBd() isoCode=orh.getCurrency()/></td>
+          <td class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotal() isoCode=orh.getCurrency()/></td>
         </tr>  
         <tr>
           <td class="tabletext" width="25%">${uiLabelMap.OrderAmountAlreadyCredited}</td>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/task/ordertasklist.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/task/ordertasklist.ftl?rev=576013&r1=576012&r2=576013&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/task/ordertasklist.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/task/ordertasklist.ftl Sat Sep 15 17:48:08 2007
@@ -107,7 +107,7 @@
                           <td><div class="tabletext"><span style="white-space: nowrap;">${orderHeaderAndRole.getString("orderDate")}</span></div></td>
                           <td><div class="tabletext">${statusItem.get("description",locale)?default(statusItem.statusId?default("N/A"))}</div></td>
                           <td align="right"><div class="tabletext">${orh.getTotalOrderItemsQuantity()?string.number}</div></td>
-                          <td align="right"><div class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotalBd() isoCode=orderHeaderAndRole.currencyUom?if_exists/></div></td>
+                          <td align="right"><div class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotal() isoCode=orderHeaderAndRole.currencyUom?if_exists/></div></td>
                           <td width="1">&nbsp;&nbsp;</td>
                           <td align='right'>
                             <a href="<@o...@ofbizUrl>" class='buttontext'>Schedule&nbsp;Delivery</a>