diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 0a2458f57a6..f084a8cd8b9 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1018,12 +1018,12 @@ class Reception extends CommonObject if (!empty($resql)) { $this->lines = array(); - while ($obj = $resql->fetch_object()) { + while ($obj = $this->db->fetch_object($resql)) { $line = new CommandeFournisseurDispatch($this->db); $line->fetch($obj->rowid); $line->fetch_product(); $sql_commfourndet = 'SELECT qty, ref, label, tva_tx, vat_src_code, subprice, multicurrency_subprice, remise_percent FROM llx_commande_fournisseurdet WHERE rowid='.$line->fk_commandefourndet; - $resql_commfourndet = $db->query($sql_commfourndet); + $resql_commfourndet = $this->db->query($sql_commfourndet); if (!empty($resql_commfourndet)) { $obj = $this->db->fetch_object($resql_commfourndet); $line->qty_asked = $obj->qty;