Author: jonesde
Date: Fri Nov 3 21:48:51 2006
New Revision: 471127
URL:
http://svn.apache.org/viewvc?view=rev&rev=471127Log:
Fixed bug when ignoring quantity so that it always returns true instead of having that depend on a compare to 0
Modified:
incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?view=diff&rev=471127&r1=471126&r2=471127==============================================================================
--- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Fri Nov 3 21:48:51 2006
@@ -1129,7 +1129,8 @@
} else if ("PRIP_QUANTITY".equals(productPriceCond.getString("inputParamEnumId"))) {
if (quantity == null) {
// if no quantity is passed in, assume all quantity conditions pass
- compare = 0;
+ // NOTE: setting compare = 0 won't do the trick here because the condition won't always be or include and equal
+ return true;
} else {
compare = quantity.compareTo(Double.valueOf(productPriceCond.getString("condValue")));
}