2 |
//$Id$ |
//$Id$ |
3 |
|
|
4 |
include('../gen/sql/pgsql/consultation.inc.php'); |
include('../gen/sql/pgsql/consultation.inc.php'); |
5 |
$type_consultation_field = 'CASE WHEN service.type_consultation=\'avec_avis_attendu\' |
|
6 |
|
// |
7 |
|
$case_type_consultation = 'CASE WHEN service.type_consultation=\'avec_avis_attendu\' |
8 |
THEN \''._("avec avis attendu").'\' |
THEN \''._("avec avis attendu").'\' |
9 |
WHEN service.type_consultation=\'pour_conformite\' |
WHEN service.type_consultation=\'pour_conformite\' |
10 |
THEN \''._("pour conformite").'\' |
THEN \''._("pour conformite").'\' |
11 |
WHEN service.type_consultation=\'pour_information\' |
WHEN service.type_consultation=\'pour_information\' |
12 |
THEN \''._("pour information").'\' |
THEN \''._("pour information").'\' |
13 |
END as "'._("type_consultation").'"'; |
END'; |
14 |
// SELECT |
// SELECT |
15 |
$champAffiche = array( |
$champAffiche = array( |
16 |
'consultation.consultation as "'._("consultation").'"', |
'consultation.consultation as "'._("consultation").'"', |
20 |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
21 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
22 |
'concat(service.abrege,\' \',service.libelle) as "'._("service").'"', |
'concat(service.abrege,\' \',service.libelle) as "'._("service").'"', |
23 |
$type_consultation_field, |
$case_type_consultation.' as "'._("type_consultation").'"', |
24 |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
25 |
'instructeur.nom as "'._("instructeur").'"', |
'instructeur.nom as "'._("instructeur").'"', |
26 |
'division.code as "'._("division").'"', |
'division.code as "'._("division").'"', |
65 |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
66 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
67 |
'service.libelle as "'._("service").'"', |
'service.libelle as "'._("service").'"', |
68 |
$type_consultation_field, |
$case_type_consultation.' as "'._("type_consultation").'"', |
69 |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
70 |
"case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"", |
"case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"", |
71 |
); |
); |
108 |
// On met la ligne en couleur selon le type de condition |
// On met la ligne en couleur selon le type de condition |
109 |
$options[] = array( |
$options[] = array( |
110 |
"type" => "condition", |
"type" => "condition", |
111 |
"field" => 'CASE WHEN service.type_consultation=\'avec_avis_attendu\' |
"field" => $case_type_consultation, |
|
THEN \''._("avec avis attendu").'\' |
|
|
WHEN service.type_consultation=\'pour_conformite\' |
|
|
THEN \''._("pour conformite").'\' |
|
|
WHEN service.type_consultation=\'pour_information\' |
|
|
THEN \''._("pour information").'\' |
|
|
END', |
|
112 |
"case" => array( |
"case" => array( |
113 |
array( |
array( |
114 |
"values" => array(_("avec avis attendu"), ), |
"values" => array(_("avec avis attendu"), ), |