diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 670b4548228..705081484fe 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3009,8 +3009,8 @@ class Product extends CommonObject $sql .= ' WHERE c.fk_statut IN ('.$this->db->sanitize($filtrestatut).') AND f.fk_statut > '.Facture::STATUS_DRAFT.' AND fd.fk_product = '.((int) $this->id); dol_syslog(__METHOD__.":: sql $sql", LOG_NOTICE); $resql = $this->db->query($sql); - if($resql) { - if($this->db->num_rows($resql) > 0) { + if ($resql) { + if ($this->db->num_rows($resql) > 0) { $obj = $this->db->fetch_object($resql); $adeduire += $obj->count; }