1 |
<?php |
2 |
//$Id$ |
3 |
include('../gen/sql/pgsql/consultation.inc.php'); |
4 |
|
5 |
// |
6 |
$case_type_consultation = 'CASE WHEN service.type_consultation=\'avec_avis_attendu\' |
7 |
THEN \''._("avec avis attendu").'\' |
8 |
WHEN service.type_consultation=\'pour_conformite\' |
9 |
THEN \''._("pour conformite").'\' |
10 |
WHEN service.type_consultation=\'pour_information\' |
11 |
THEN \''._("pour information").'\' |
12 |
END'; |
13 |
|
14 |
// Titre de la page |
15 |
$ent = _("Demandes d'avis"); |
16 |
// FROM |
17 |
$table = DB_PREFIXE."consultation |
18 |
LEFT JOIN ".DB_PREFIXE."dossier |
19 |
ON consultation.dossier=dossier.dossier |
20 |
LEFT JOIN ".DB_PREFIXE."service |
21 |
ON service.service=consultation.service |
22 |
LEFT JOIN ".DB_PREFIXE."lien_service_om_utilisateur |
23 |
ON lien_service_om_utilisateur.service=service.service |
24 |
LEFT JOIN ".DB_PREFIXE."om_utilisateur |
25 |
ON om_utilisateur.om_utilisateur=lien_service_om_utilisateur.om_utilisateur |
26 |
LEFT OUTER JOIN ".DB_PREFIXE."avis_consultation |
27 |
ON consultation.avis_consultation=avis_consultation.avis_consultation |
28 |
LEFT JOIN ".DB_PREFIXE."donnees_techniques |
29 |
ON donnees_techniques.dossier_instruction = dossier.dossier |
30 |
LEFT JOIN ".DB_PREFIXE."lien_dossier_demandeur |
31 |
ON dossier.dossier=lien_dossier_demandeur.dossier |
32 |
LEFT JOIN ".DB_PREFIXE."demandeur |
33 |
ON demandeur.demandeur=lien_dossier_demandeur.demandeur |
34 |
"; |
35 |
// XXX LEFT OUTER JOIN pieces_complementaire |
36 |
// SELECT |
37 |
$champAffiche = array( |
38 |
'consultation.consultation as "'._("consultation").'"', |
39 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
40 |
'consultation.dossier as "'._("dossier").'"', |
41 |
// date de depots de piece complementaire |
42 |
'TRIM(CONCAT(donnees_techniques.am_projet_desc,\' \',donnees_techniques.co_projet_desc)) as "'._("Nature des travaux").'"', |
43 |
'TRIM(CONCAT(dossier.terrain_adresse_voie_numero,\' \',dossier.complement, |
44 |
\' \', dossier.terrain_adresse_lieu_dit, \' \', dossier.terrain_adresse_code_postal,\' \', dossier.terrain_adresse_localite)) as "'._("Adresse du terrain").'"', |
45 |
'TRIM(CONCAT(personne_morale_denomination,\' \',personne_morale_nom,\' \',demandeur.particulier_nom)) as "'._("petitionaire").'"', |
46 |
'dossier.shon as "'._("surface").'"', |
47 |
'service.abrege as "'._("service").'"', |
48 |
$case_type_consultation.' as "'._("type_consultation").'"', |
49 |
); |
50 |
// |
51 |
$champRecherche = array( |
52 |
'consultation.consultation as "'._("consultation").'"', |
53 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
54 |
'consultation.dossier as "'._("dossier").'"', |
55 |
// date de depots de piece complementaire |
56 |
'dossier.complement as "'._("Adresse du terrain").'"', |
57 |
'dossier.terrain_adresse_code_postal as "'._("Code postal du terrain").'"', |
58 |
'dossier.terrain_adresse_localite as "'._("Ville du terrain").'"', |
59 |
'demandeur.personne_morale_denomination as "'._("petitionnaire personne morale").'"', |
60 |
'demandeur.particulier_nom as "'._("petitionnaire particulier").'"', |
61 |
'dossier.shon as "'._("surface").'"', |
62 |
'service.abrege as "'._("service").'"', |
63 |
); |
64 |
$tri="ORDER BY consultation.date_limite::date ASC"; |
65 |
$edition=""; |
66 |
$selection=' WHERE om_utilisateur.login=\''.$_SESSION['login'].'\''; |
67 |
|
68 |
//Suppression des liens |
69 |
$tab_actions['corner']['ajouter']=NULL; |
70 |
$tab_actions['left']['consulter']=NULL; |
71 |
|
72 |
//Recherche avancee |
73 |
|
74 |
$champs = array(); |
75 |
|
76 |
$champs['date_limite'] = |
77 |
array('colonne' => 'date_limite', |
78 |
'table' => 'consultation', |
79 |
'libelle' => _('Date limite'), |
80 |
'type' => 'date', |
81 |
'where' => 'intervaldate'); |
82 |
|
83 |
$champs['dossier'] = array( |
84 |
'table' => 'consultation', |
85 |
'colonne' => 'dossier', |
86 |
'type' => 'text', |
87 |
'libelle' => _('dossier')); |
88 |
|
89 |
$champs['nature'] = array( |
90 |
'table' => 'donnees_techniques', |
91 |
'colonne' => array('am_projet_desc','co_projet_desc'), |
92 |
'type' => 'text', |
93 |
'libelle' => _('nature des travaux')); |
94 |
|
95 |
$champs['adresse'] = array( |
96 |
'table' => 'dossier', |
97 |
'colonne' => array('terrain_adresse_voie_numero', |
98 |
'complement', |
99 |
'terrain_adresse_lieu_dit', |
100 |
'terrain_adresse_code_postal', |
101 |
'terrain_adresse_localite'), |
102 |
'type' => 'text', |
103 |
'libelle' => _('terrain')); |
104 |
|
105 |
$champs['petitionnaire'] = array( |
106 |
'table' => 'demandeur', |
107 |
'colonne' => array('particulier_nom', 'personne_morale_denomination'), |
108 |
'type' => 'text', |
109 |
'libelle' => _('petitionnaire')); |
110 |
|
111 |
$champs['service_abrege'] = array( |
112 |
'table' => 'service', |
113 |
'colonne' => 'abrege', |
114 |
'type' => 'text', |
115 |
'libelle' => _('Service (abrege)')); |
116 |
|
117 |
$options[] = array('type' => 'search', |
118 |
'display' => true, |
119 |
'advanced' => $champs, |
120 |
'absolute_object' => 'consultation', |
121 |
'export' => array("csv")); |
122 |
|
123 |
$sousformulaire=array("dossier_document"); |
124 |
|
125 |
$sousformulaire_parameters = array( |
126 |
|
127 |
"dossier_document" => array( |
128 |
"title" => _("Documents"), |
129 |
"href" => "../app/dossier_document.view.php", |
130 |
), |
131 |
); |
132 |
|
133 |
/** |
134 |
* Options |
135 |
*/ |
136 |
// On met la ligne en couleur selon le type de condition |
137 |
$options[] = array( |
138 |
"type" => "condition", |
139 |
"field" => $case_type_consultation, |
140 |
"case" => array( |
141 |
array( |
142 |
"values" => array(_("avec avis attendu"), ), |
143 |
"style" => "consultation-avec-avis-attendu", |
144 |
), |
145 |
array( |
146 |
"values" => array(_("pour conformite"), ), |
147 |
"style" => "consultation-pour-conformite", |
148 |
), |
149 |
array( |
150 |
"values" => array(_("pour information"), ), |
151 |
"style" => "consultation-pour-information", |
152 |
), |
153 |
), |
154 |
); |
155 |
?> |