diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php index cc9a05487..4cd537e27 100644 --- a/include/class/follow_up.class.php +++ b/include/class/follow_up.class.php @@ -1202,7 +1202,7 @@ class Follow_Up $sql="select ag_ref,ag_hour,coalesce(vw_name,'Interne') as vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_remind_date,'DD.MM.YYYY') as ag_timestamp_fmt,ag_timestamp ". " from action_gestion join document_type ". " on (ag_type=dt_id) left join vw_fiche_attr on (f_id=f_id_dest) where ag_state not in (1,4) - and to_char(ag_remind_date,'YYMMDD') < to_char(now(),'YYMMDD') and ".self::sql_security_filter($this->db,'R'); + and to_char(ag_remind_date,'YYMMDD') < to_char(now(),'YYMMDD') and ".self::sql_security_filter($this->db,'R')." order by ag_remind_date desc "; $array=$this->db->get_array($sql); return $array; }