diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 07a8af10484..98543cfbcbe 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2309,7 +2309,7 @@ class Adherent extends CommonObject $sql = "SELECT a.rowid, a.datefin, a.statut"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a"; $sql.= ", ".MAIN_DB_PREFIX."adherent_type as t"; - $sql.= " WHERE d.fk_adherent_type = t.rowid"; + $sql.= " WHERE a.fk_adherent_type = t.rowid"; $sql.= " AND a.statut = 1"; $sql.= " AND a.entity IN (".getEntity('adherent').")"; $sql.= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = 1)";