Author: lektran
Date: Sat Apr 28 12:12:00 2012
New Revision: 1331753
URL: http://svn.apache.org/viewvc?rev=1331753&view=rev
Log:
Fix incorrect BigDecimal comparison, the goal is to find out if baseQuantity is
greater than 1)
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1331753&r1=1331752&r2=1331753&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
(original)
+++
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
Sat Apr 28 12:12:00 2012
@@ -2503,7 +2503,7 @@ public class ShoppingCartItem implements
int thisIndex = cart.items().indexOf(this);
List<ShoppingCartItem> newItems = new ArrayList<ShoppingCartItem>();
- if (baseQuantity.compareTo(BigDecimal.ONE) > 1) {
+ if (baseQuantity.compareTo(BigDecimal.ONE) > 0) {
for (int i = 1; i < baseQuantity.intValue(); i++) {
// clone the item
ShoppingCartItem item = new ShoppingCartItem(this);