".__("teletransmission"); $table=DB_PREFIXE."instruction"; $advsearch_fields= array( // 'dossier' => array( 'colonne' => 'dossier', 'table' => 'instruction', 'libelle' => __("dossier"), 'type' => 'text', 'taille' => '', 'max' => '', ), 'date_retour_signature' => array( 'colonne' => 'date_retour_signature', 'table' => 'instruction', 'libelle' => __("date_retour_signature"), 'type' => 'date', 'where' => 'intervaldate', 'taille' => '', ), 'collectivite' => array( 'table' => 'instruction', 'colonne' => 'etat', 'type' => 'text', 'libelle' => _('etat'), 'taille' => '', 'max' => '', ), ); // advsearch -> options $options[] = array( 'type' => 'search', 'display' => true, 'advanced' => $advsearch_fields, 'absolute_object' => 'dossier', ); $champAffiche=array( 'instruction.destinataire as "'.__("dossier").'"', 'instruction.date_retour_signature as "'.__("date_retour_signature").'"', 'instruction.date_envoi_controle_legalite as "'.__("date_envoi_controle_legalite").'"', 'instruction.date_retour_controle_legalite as "'.__("date_retour_controle_legalite").'"', 'instruction.etat as "'.__("etat").'"', "CASE WHEN date_retour_signature IS NOT NULL AND date_envoi_controle_legalite IS NOT NULL AND date_retour_controle_legalite IS NOT NULL THEN 'Télétransmis' WHEN date_retour_signature IS NOT NULL AND date_envoi_controle_legalite IS NOT NULL THEN 'En cours de télétransmission' WHEN date_retour_signature IS NOT NULL AND date_envoi_controle_legalite IS NULL THEN 'A télétransmettre' ELSE 'Non télétransmissible' END as ".__("statut")."", ); $champRecherche = array( 'instruction.date_retour_signature as "'.__("date_retour_signature").'"', 'instruction.destinataire as "'.__("dossier").'"', 'instruction.etat as "'.__("etat").'"', ); $filtre = " AND date_retour_signature BETWEEN now()- interval '7 day' AND now()"; if(!empty($f->getParameter('teletransmission_intervalle_date_retour_signature')) && !is_null($f->getParameter('teletransmission_intervalle_date_retour_signature'))){ $filtre = sprintf(" AND date_retour_signature BETWEEN now()- interval '%s day' AND now()",$f->getParameter('teletransmission_intervalle_date_retour_signature')); } $selection = "WHERE instruction.date_retour_signature IS NOT NULL"; $selection .= $filtre; $tri="ORDER BY instruction.date_retour_signature ASC NULLS LAST, instruction.destinataire ASC NULLS LAST, instruction.etat ASC NULLS LAST"; $tab_actions['corner']['ajouter'] = NULL; $tab_actions['left']['consulter']=NULL; $tab_actions['content'] = null;