svn commit: r1820411 - /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java

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

svn commit: r1820411 - /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java

nmalin
Author: nmalin
Date: Sat Jan  6 15:45:13 2018
New Revision: 1820411

URL: http://svn.apache.org/viewvc?rev=1820411&view=rev
Log:
Fixed: ProductPriceRuleCondition 'is Product' (enum:PRIP_PRODUCT_ID) don't check the virtual product (OFBIZ-10149).

Modified:
    ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java?rev=1820411&r1=1820410&r2=1820411&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java Sat Jan  6 15:45:13 2018
@@ -1032,7 +1032,7 @@ public class PriceServices {
         int compare = 0;
 
         if ("PRIP_PRODUCT_ID".equals(productPriceCond.getString("inputParamEnumId"))) {
-            compare = productId.compareTo(productPriceCond.getString("condValue"));
+            compare = UtilMisc.toList(productId, virtualProductId).contains(productPriceCond.getString("condValue"))? 0: 1;
         } else if ("PRIP_PROD_CAT_ID".equals(productPriceCond.getString("inputParamEnumId"))) {
             // if a ProductCategoryMember exists for this productId and the specified productCategoryId
             String productCategoryId = productPriceCond.getString("condValue");