# HG changeset patch
# User Mario Castello <mario.castello@peoplewalking.com>
# Date 1466529188 21600
#      mar jun 21 11:13:08 2016 -0600
# Node ID 582b36e42bad34b1bcdba6cc54b9c6f3bda0e6fd
# Parent  dcdd19a97c4443f7c1f3ad752e9ebc8d8aacfb0b
Fixed issue 33314: Added validation to active property of product

diff --git a/src/org/openbravo/retail/posterminal/master/ProductProperties.java b/src/org/openbravo/retail/posterminal/master/ProductProperties.java
--- a/src/org/openbravo/retail/posterminal/master/ProductProperties.java
+++ b/src/org/openbravo/retail/posterminal/master/ProductProperties.java
@@ -94,7 +94,7 @@
           add(new HQLProperty("ppp.algorithm", "algorithm"));
         }
         add(new HQLProperty(
-            "case when product.active = 'Y' and pli.active is not null then pli.active else product.active end",
+            "case when product.active = 'Y' and product.sale = 'Y' and pli.active is not null then pli.active else 'N' end",
             "active"));
       }
     });
