Author: lektran
Date: Thu Jul 19 04:20:02 2007
New Revision: 557575
URL:
http://svn.apache.org/viewvc?view=rev&rev=557575Log:
Applied fix from trunk for revision: 556341
Modified:
ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.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?view=diff&rev=557575&r1=557574&r2=557575==============================================================================
--- 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 Thu Jul 19 04:20:02 2007
@@ -4220,6 +4220,9 @@
}
}
+ BigDecimal amountBd = new BigDecimal(amount.doubleValue());
+ amountBd = amountBd.setScale(scale, rounding);
+
// create the OrderPaymentPreference record
GenericValue opp = delegator.makeValue("OrderPaymentPreference", new HashMap());
opp.set("paymentMethodTypeId", valueObj.getString("paymentMethodTypeId"));
@@ -4228,7 +4231,7 @@
opp.set("paymentMethodId", paymentMethodId);
opp.set("finAccountId", finAccountId);
opp.set("billingPostalCode", postalCode);
- opp.set("maxAmount", amount);
+ opp.set("maxAmount", amountBd);
if (refNum != null) {
opp.set("manualRefNum", refNum[0]);
opp.set("manualAuthCode", refNum[1]);