/[openfoncier]/trunk/sql/pgsql/consultation_retours.php
ViewVC logotype

Diff of /trunk/sql/pgsql/consultation_retours.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6929 by softime, Thu Jun 15 16:57:15 2017 UTC revision 11876 by softime, Thu Apr 7 20:47:38 2022 UTC
# Line 15  Line 15 
15    
16  //  //
17  include "../gen/sql/pgsql/consultation.inc.php";  include "../gen/sql/pgsql/consultation.inc.php";
18    include "../sql/pgsql/app_om_tab_common_select.inc.php";
19    
20  /**  /**
21   *   * Filtres
22   */   */
23  //  //
24  if ($obj === "consultation_tous_retours") {  if ($obj === "consultation_tous_retours") {
# Line 52  $tab_description = $conf["message_help"] Line 53  $tab_description = $conf["message_help"]
53  //  //
54  $tab_title = _("consultation");  $tab_title = _("consultation");
55    
56  //  // Traduction des termes technique du type de consultation.
57  $displayed_fields_begin = array(  // Pour les consultations des tiers et des service la traduction est la même
58      'consultation.consultation as "'._("consultation").'"',  // sauf qu'on ne cherche pas les résultats dans la même table. Ce template
59      'dossier.dossier_libelle as "'._("dossier").'"',  // existe donc pour pouvoir être utilisé dans les 2 cas sans réécrire ce code
60      'concat(service.abrege,\' \',service.libelle) as "'._("service").'"',  $template_case_traduction_type_consultation =
61      'CASE WHEN service.type_consultation=\'avec_avis_attendu\'      'CASE WHEN %1$s.type_consultation=\'avec_avis_attendu\'
62              THEN \''._("avec avis attendu").'\'              THEN \''._("avec avis attendu").'\'
63              WHEN service.type_consultation=\'pour_conformite\'              WHEN %1$s.type_consultation=\'pour_conformite\'
64              THEN \''._("pour conformite").'\'              THEN \''._("pour conformite").'\'
65              WHEN service.type_consultation=\'pour_information\'              WHEN %1$s.type_consultation=\'pour_information\'
66              THEN \''._("pour information").'\'              THEN \''._("pour information").'\'
67      END as "'._("type_consultation").'"',      END';
68    // Affichage du type de consultation traduit selon l'élément consulte (tiers ou service)
69    $case_type_consultation = sprintf(
70        'CASE WHEN consultation.service IS NOT NULL
71            THEN (%1$s)
72            ELSE (%2$s)
73        END',
74        sprintf($template_case_traduction_type_consultation, 'service'),
75        sprintf($template_case_traduction_type_consultation, 'motif_consultation')
76    );
77    
78    // Affichage du nom du service ou du tiers consulte
79    $case_element_consulte =
80    "CASE WHEN consultation.service IS NOT NULL
81        THEN concat(service.abrege, ' - ', service.libelle)
82        ELSE concat(tiers_consulte.abrege, ' - ', tiers_consulte.libelle)
83    END";
84    
85    //
86    $displayed_fields_begin = array(
87        'consultation.consultation as "'._("consultation").'"',
88        $select__dossier_libelle__column_as,
89        $case_element_consulte.' as "'._("service / tiers").'"',
90        $case_type_consultation.' as "'._("type_consultation").'"',
91      'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"',      'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"',
92      'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"',      'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"',
93      'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"',      'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"',
# Line 140  $advsearch_fields_begin = array( Line 164  $advsearch_fields_begin = array(
164          'colonne' => 'abrege',          'colonne' => 'abrege',
165          'type' => 'text',          'type' => 'text',
166          'libelle' => _('Service (abrege)'),          'libelle' => _('Service (abrege)'),
167            'taille' => '',
168            'max' => '',
169      ),      ),
170      //      //
171      'service' => array(      'service' => array(
# Line 147  $advsearch_fields_begin = array( Line 173  $advsearch_fields_begin = array(
173          'colonne' => 'libelle',          'colonne' => 'libelle',
174          'type' => 'text',          'type' => 'text',
175          'libelle' => _('Service'),          'libelle' => _('Service'),
176            'taille' => '',
177            'max' => '',
178      ),      ),
179  );  );
180  //  //
# Line 157  $advsearch_field_instructeur = array( Line 185  $advsearch_field_instructeur = array(
185          'table' => 'instructeur',          'table' => 'instructeur',
186          'libelle' => _('Instructeur'),          'libelle' => _('Instructeur'),
187          'type' => 'text',          'type' => 'text',
188            'taille' => '',
189            'max' => '',
190      ),      ),
191  );  );
192  //  //
# Line 167  $advsearch_field_division = array( Line 197  $advsearch_field_division = array(
197          'table' => 'division',          'table' => 'division',
198          'libelle' => _('Division'),          'libelle' => _('Division'),
199          'type' => 'text',          'type' => 'text',
200            'taille' => '',
201            'max' => '',
202      ),      ),
203  );  );
204  //  //
# Line 177  $advsearch_field_collectivite = array( Line 209  $advsearch_field_collectivite = array(
209          'colonne' => 'libelle',          'colonne' => 'libelle',
210          'type' => 'text',          'type' => 'text',
211          'libelle' => _('om_collectivite'),          'libelle' => _('om_collectivite'),
212            'taille' => '',
213            'max' => '',
214      ),      ),
215  );  );
216  //  //
# Line 188  $advsearch_fields_end = array( Line 222  $advsearch_fields_end = array(
222          'libelle' => _('Date d\'envoi'),          'libelle' => _('Date d\'envoi'),
223          'type' => 'date',          'type' => 'date',
224          'where' => 'intervaldate',          'where' => 'intervaldate',
225            'taille' => '',
226      ),      ),
227      //      //
228      'date_retour' => array(      'date_retour' => array(
# Line 196  $advsearch_fields_end = array( Line 231  $advsearch_fields_end = array(
231          'libelle' => _('Date de retour'),          'libelle' => _('Date de retour'),
232          'type' => 'date',          'type' => 'date',
233          'where' => 'intervaldate',          'where' => 'intervaldate',
234            'taille' => '',
235      ),      ),
236      //      //
237      'date_limite' => array(      'date_limite' => array(
# Line 204  $advsearch_fields_end = array( Line 240  $advsearch_fields_end = array(
240          'libelle' => _('Date limite'),          'libelle' => _('Date limite'),
241          'type' => 'date',          'type' => 'date',
242          'where' => 'intervaldate',          'where' => 'intervaldate',
243            'taille' => '',
244      ),      ),
245  );  );
246    

Legend:
Removed from v.6929  
changed lines
  Added in v.11876

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26