Check quantity

This commit is contained in:
Michael RICOIS 2018-01-30 17:47:03 +01:00
parent 4fd935962e
commit 84a1b37f50

View File

@ -66,7 +66,7 @@ SELECT
l.id_order
FROM `"._DB_PREFIX_."discount` d, `"._DB_PREFIX_."loyalty` l
LEFT OUTER JOIN `"._DB_PREFIX_."order_discount` od ON (od.id_discount IS NULL)
WHERE d.active=1 AND d.id_discount=l.id_discount
WHERE d.active=1 AND d.`quantity` != 0 AND d.id_discount=l.id_discount
AND d.date_to > '".$dateSqlStart."' AND d.date_to < '".$dateSqlEnd."'";
$result = Db::getInstance()->ExecuteS($sql);
if ($result === false) {