svn commit: r1644010 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1644010 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java

jleroux@apache.org
Author: jleroux
Date: Tue Dec  9 09:40:53 2014
New Revision: 1644010

URL: http://svn.apache.org/r1644010
Log:
Hide useless error message related to the "Happy hour" (9020) promotion https://issues.apache.org/jira/browse/OFBIZ-5899

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1644010&r1=1644009&r2=1644010&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Tue Dec  9 09:40:53 2014
@@ -411,6 +411,7 @@ public class ProductPromoWorker {
         // set a max limit on how many times each promo can be run, for cases where there is no use limit this will be the use limit
         //default to 2 times the number of items in the cart
         long maxUseLimit = cart.getTotalQuantity().multiply(BigDecimal.valueOf(2)).setScale(0, BigDecimal.ROUND_CEILING).longValue();
+        maxUseLimit = Math.max(1, maxUseLimit);
 
         try {
             // repeat until no more rules to run: either all rules are run, or no changes to the cart in a loop