diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index ede7615a65a..78c0add9aab 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -188,7 +188,7 @@ class DiscountAbsolute // Check if we can remove the discount if ($this->fk_facture_source) { - $sql.="SELECT COUNT(rowid) as nb"; + $sql="SELECT COUNT(rowid) as nb"; $sql.=" FROM ".MAIN_DB_PREFIX."societe_remise_except"; $sql.=" WHERE (fk_facture_line IS NOT NULL"; // Not used as absolute simple discount $sql.=" OR fk_facture IS NOT NULL)"; // Not used as credit note and not used as deposit