diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 5e035febd14..b6604133c31 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -653,7 +653,7 @@ class Don extends CommonObject } else if (! empty($ref)) { - $sql.= " AND ref='".$this->db->escape($ref)."'"; + $sql.= " AND d.ref='".$this->db->escape($ref)."'"; } dol_syslog(get_class($this)."::fetch", LOG_DEBUG);