svn commit: r1820410 - /ofbiz/ofbiz-framework/branches/release17.12/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: r1820410 - /ofbiz/ofbiz-framework/branches/release17.12/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java

nmalin
Author: nmalin
Date: Sat Jan  6 15:40:00 2018
New Revision: 1820410

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

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

Modified: ofbiz/ofbiz-framework/branches/release17.12/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java?rev=1820410&r1=1820409&r2=1820410&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java Sat Jan  6 15:40:00 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");