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 |
|
THEN \''._("avec avis attendu").'\' |
7 |
|
WHEN service.type_consultation=\'pour_conformite\' |
8 |
|
THEN \''._("pour conformite").'\' |
9 |
|
WHEN service.type_consultation=\'pour_information\' |
10 |
|
THEN \''._("pour information").'\' |
11 |
|
END as "'._("type_consultation").'"'; |
12 |
// SELECT |
// SELECT |
13 |
$champAffiche = array( |
$champAffiche = array( |
14 |
'consultation.consultation as "'._("consultation").'"', |
'consultation.consultation as "'._("consultation").'"', |
17 |
'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"', |
'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"', |
18 |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
19 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
20 |
'service.libelle as "'._("service").'"', |
'concat(service.abrege,\' \',service.libelle) as "'._("service").'"', |
21 |
|
$type_consultation_field, |
22 |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
23 |
'instructeur.nom as "'._("instructeur").'"', |
'instructeur.nom as "'._("instructeur").'"', |
24 |
'division.code as "'._("division").'"', |
'division.code as "'._("division").'"', |
63 |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
64 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
65 |
'service.libelle as "'._("service").'"', |
'service.libelle as "'._("service").'"', |
66 |
|
$type_consultation_field, |
67 |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
68 |
"case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"", |
"case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"", |
69 |
); |
); |
94 |
"style" => "non_lu", |
"style" => "non_lu", |
95 |
), |
), |
96 |
), |
), |
97 |
|
); |
98 |
|
/** |
99 |
|
* Options |
100 |
|
*/ |
101 |
|
// On met la ligne en couleur selon le type de condition |
102 |
|
$options[] = array( |
103 |
|
"type" => "condition", |
104 |
|
"field" => 'CASE WHEN service.type_consultation=\'avec_avis_attendu\' |
105 |
|
THEN \''._("avec avis attendu").'\' |
106 |
|
WHEN service.type_consultation=\'pour_conformite\' |
107 |
|
THEN \''._("pour conformite").'\' |
108 |
|
WHEN service.type_consultation=\'pour_information\' |
109 |
|
THEN \''._("pour information").'\' |
110 |
|
END', |
111 |
|
"case" => array( |
112 |
|
array( |
113 |
|
"values" => array(_("avec avis attendu"), ), |
114 |
|
"style" => "consultation-avec-avis-attendu", |
115 |
|
), |
116 |
|
array( |
117 |
|
"values" => array(_("pour conformite"), ), |
118 |
|
"style" => "consultation-pour-conformite", |
119 |
|
), |
120 |
|
array( |
121 |
|
"values" => array(_("pour information"), ), |
122 |
|
"style" => "consultation-pour-information", |
123 |
|
), |
124 |
|
), |
125 |
); |
); |
126 |
|
|
127 |
?> |
?> |