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/07/29 01:27:33 UTC
svn commit: r560644 - in /ofbiz/trunk/applications:
accounting/webapp/accounting/WEB-INF/actions/transaction/
ecommerce/webapp/ecommerce/WEB-INF/actions/order/
order/src/org/ofbiz/order/order/
order/webapp/ordermgr/WEB-INF/actions/entry/ order/webapp/o...
Author: lektran
Date: Sat Jul 28 16:27:32 2007
New Revision: 560644
URL: http://svn.apache.org/viewvc?view=rev&rev=560644
Log:
Replaced all remaining calls to OrderReadHelper.getOrderGrandTotal() with it's BigDecimal equivalent, OFBIZ-880
Modified:
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/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/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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- 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 Jul 28 16:27:32 2007
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+import java.math.BigDecimal;
import org.ofbiz.order.order.OrderReadHelper;
import org.ofbiz.base.util.UtilMisc;
@@ -32,7 +33,7 @@
if(orderHeader != null){
orh = new OrderReadHelper(orderHeader);
context.put("orh", orh);
- context.put("overrideAmount", new Double(orh.getOrderGrandTotal()));
+ context.put("overrideAmount", new Double(orh.getOrderGrandTotalBd().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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- 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 Jul 28 16:27:32 2007
@@ -17,6 +17,7 @@
* under the License.
*/
+import java.math.BigDecimal;
import org.ofbiz.base.util.*;
import org.ofbiz.entity.*;
import org.ofbiz.entity.condition.*;
@@ -174,7 +175,7 @@
context.put("orderShippingTotal", orderShippingTotal);
context.put("orderTaxTotal", orderTaxTotal);
- context.put("orderGrandTotal", OrderReadHelper.getOrderGrandTotal(orderItems, orderAdjustments));
+ context.put("orderGrandTotal", OrderReadHelper.getOrderGrandTotalBd(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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Sat Jul 28 16:27:32 2007
@@ -1288,7 +1288,7 @@
*/
public double getOrderOpenAmount() throws GenericEntityException {
GenericDelegator delegator = orderHeader.getDelegator();
- double total = getOrderGrandTotal();
+ BigDecimal total = getOrderGrandTotalBd();
double openAmount = 0;
List prefs = getPaymentPreferences();
@@ -1324,7 +1324,7 @@
}
// return either a positive amount or positive zero
- return Math.max(total - openAmount, 0);
+ return Math.max(total.doubleValue() - openAmount, 0);
}
public List getOrderHeaderAdjustments() {
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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Sat Jul 28 16:27:32 2007
@@ -3479,7 +3479,7 @@
try {
Debug.log("Calling process payments...", module);
//Debug.set(Debug.VERBOSE, true);
- paymentResp = CheckOutHelper.processPayment(orderId, orh.getOrderGrandTotal(), orh.getCurrency(), productStore, userLogin, false, false, dispatcher, delegator);
+ paymentResp = CheckOutHelper.processPayment(orderId, orh.getOrderGrandTotalBd().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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- 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 Jul 28 16:27:32 2007
@@ -18,6 +18,7 @@
*/
import java.lang.*;
+import java.math.BigDecimal;
import org.ofbiz.base.util.*;
import org.ofbiz.entity.*;
import org.ofbiz.accounting.payment.*;
@@ -138,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.getOrderGrandTotal(orderItems, orderAdjustments));
+context.put("orderGrandTotal", OrderReadHelper.getOrderGrandTotalBd(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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- 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 Jul 28 16:27:32 2007
@@ -17,6 +17,7 @@
* under the License.
*/
+import java.math.BigDecimal;
import java.util.*;
import java.sql.Timestamp;
import org.ofbiz.entity.*;
@@ -104,7 +105,7 @@
taxAmount += OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, true, false);
context.put("taxAmount", taxAmount);
- grandTotal = OrderReadHelper.getOrderGrandTotal(orderItems, orderAdjustments);
+ grandTotal = OrderReadHelper.getOrderGrandTotalBd(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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl Sat Jul 28 16:27:32 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.getOrderGrandTotal() isoCode=orh.getCurrency()/></td>
+ <td class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotalBd() 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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl Sat Jul 28 16:27:32 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.getOrderGrandTotal() isoCode=orh.getCurrency()/></td>
+ <td class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotalBd() 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?view=diff&rev=560644&r1=560643&r2=560644
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/task/ordertasklist.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/task/ordertasklist.ftl Sat Jul 28 16:27:32 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.getOrderGrandTotal() isoCode=orderHeaderAndRole.currencyUom?if_exists/></div></td>
+ <td align="right"><div class="tabletext"><@ofbizCurrency amount=orh.getOrderGrandTotalBd() isoCode=orderHeaderAndRole.currencyUom?if_exists/></div></td>
<td width="1"> </td>
<td align='right'>
<a href="<@o...@ofbizUrl>" class='buttontext'>Schedule Delivery</a>