1 |
<?php |
2 |
//$Id$ |
3 |
//gen openMairie le 10/02/2011 20:39 |
4 |
include('../gen/sql/pgsql/dossier.inc.php'); |
5 |
|
6 |
/*Tables sur lesquels la requête va s'effectuer*/ |
7 |
$table = DB_PREFIXE."dossier |
8 |
LEFT JOIN ".DB_PREFIXE."lien_dossier_demandeur |
9 |
ON lien_dossier_demandeur.dossier=dossier.dossier |
10 |
AND lien_dossier_demandeur.petitionnaire_principal IS TRUE |
11 |
LEFT JOIN ".DB_PREFIXE."demandeur |
12 |
ON lien_dossier_demandeur.demandeur=demandeur.demandeur |
13 |
LEFT JOIN ".DB_PREFIXE."instructeur |
14 |
ON dossier.instructeur = instructeur.instructeur |
15 |
LEFT JOIN ".DB_PREFIXE."om_utilisateur |
16 |
ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur |
17 |
LEFT JOIN ".DB_PREFIXE."avis_decision |
18 |
ON avis_decision.avis_decision=dossier.avis_decision |
19 |
LEFT JOIN ".DB_PREFIXE."division |
20 |
ON dossier.division=division.division"; |
21 |
|
22 |
/*Champs du début de la requête*/ |
23 |
$champAffiche=array( |
24 |
'dossier.dossier as "'._("dossier").'"', |
25 |
'TRIM(CONCAT(personne_morale_denomination,\' \',personne_morale_nom,\' \',demandeur.particulier_nom)) as "'._("petitionaire").'"', |
26 |
'instructeur.nom as "'._("instructeur").'"', |
27 |
'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"', |
28 |
'dossier.date_dernier_depot as "'._("date_dernier_depot").'"', |
29 |
'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"', |
30 |
'to_char(dossier.date_notification_delai ,\'DD/MM/YYYY\') as "'._("date_notification_delai").'"', |
31 |
'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
32 |
'etat as "'._("etat").'"', |
33 |
'avis_decision.libelle as "'._("avis_decision").'"', |
34 |
'CASE WHEN dossier.enjeu_erp is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_erp-16" title="'._('Enjeu ERP').'">ERP</span>\' ELSE \'\' END || |
35 |
CASE WHEN dossier.enjeu_urba is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_urba-16" title="'._('Enjeu Urba').'">URBA</span>\' ELSE \'\' END |
36 |
as "'._("enjeu").'"', |
37 |
); |
38 |
|
39 |
/*Tri*/ |
40 |
$tri= "order by dossier.dossier"; |
41 |
|
42 |
/*Recherche simple*/ |
43 |
$champRecherche=array( 'dossier.dossier as "'._("dossier").'"', |
44 |
'personne_morale_denomination as "'._("personne_morale_denomination").'"', |
45 |
'particulier_nom as "'._("particulier_nom").'"', |
46 |
); |
47 |
|
48 |
/*Icone*/ |
49 |
$ico = "../img/ico_dossier.png"; |
50 |
|
51 |
$edition=""; |
52 |
|
53 |
/*Si l'on se trouve dans le formulaire dossier_instruction*/ |
54 |
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") { |
55 |
// Configuration de la recherche avancee |
56 |
if (!isset($options)) { |
57 |
$options = array(); |
58 |
} |
59 |
// Options pour les select de faux booléens |
60 |
$args = array( |
61 |
0 => array("", "Oui", "Non", ), |
62 |
1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ), |
63 |
); |
64 |
/*Champs pour la recherche avancée*/ |
65 |
$champs['dossier'] = array( |
66 |
'table' => 'dossier', |
67 |
'colonne' => 'dossier', |
68 |
'type' => 'text', |
69 |
'taille' => 30, |
70 |
'libelle' => _('dossier')); |
71 |
// |
72 |
$champs['dossier_autorisation_type_detaille'] = array( |
73 |
'table' => 'dossier_autorisation_type_detaille', |
74 |
'colonne' => 'dossier_autorisation_type_detaille', |
75 |
'type' => 'select', |
76 |
'taille' => 30, |
77 |
'libelle' => _('dossier_autorisation_type_detaille')); |
78 |
|
79 |
$champs['particulier'] = array( |
80 |
'table' => 'demandeur', |
81 |
'colonne' => array('particulier_nom','particulier_prenom','particulier_nom'), |
82 |
'type' => 'text', |
83 |
'taille' => 30, |
84 |
'libelle' => _('Particulier')); |
85 |
// |
86 |
$champs['societe'] = array( |
87 |
'table' => 'demandeur', |
88 |
'colonne' => array('personne_morale_nom','personne_morale_prenom','personne_morale_denomination'), |
89 |
'type' => 'text', |
90 |
'taille' => 30, |
91 |
'libelle' => _('Personne morale')); |
92 |
// |
93 |
$champs['parcelle'] = array( |
94 |
'table' => 'dossier', |
95 |
'colonne' => 'terrain_references_cadastrales', |
96 |
'type' => 'text', |
97 |
'taille' => 30, |
98 |
'libelle' => _('parcelle')); |
99 |
//// COL2 |
100 |
|
101 |
|
102 |
// |
103 |
$champs['etat'] = array( |
104 |
'table' => 'dossier', |
105 |
'colonne' => 'etat', |
106 |
'type' => 'select', |
107 |
'libelle' => _('etat')); |
108 |
// |
109 |
$champs['accord_tacite'] = array( |
110 |
'table' => 'dossier', |
111 |
'colonne' => 'accord_tacite', |
112 |
'type' => 'select', |
113 |
"subtype" => "manualselect", |
114 |
'libelle' => _('accord_tacite'), |
115 |
"args" => $args, |
116 |
); |
117 |
|
118 |
//// COL3 |
119 |
|
120 |
|
121 |
|
122 |
|
123 |
// |
124 |
$champs['instructeur'] = array( |
125 |
'table' => 'dossier', |
126 |
'colonne' => 'instructeur', |
127 |
'type' => 'select', |
128 |
'libelle' => _('instructeur')); |
129 |
// |
130 |
//$champs['architecte'] = array( |
131 |
// 'table' => 'dossier', |
132 |
// 'colonne' => 'architecte', |
133 |
// 'type' => 'select', |
134 |
// 'libelle' => _('architecte')); |
135 |
|
136 |
// |
137 |
$champs['date_depot'] = array( |
138 |
'colonne' => 'date_depot', |
139 |
'table' => 'dossier', |
140 |
'libelle' => _('date_depot'), |
141 |
'lib1'=> _("debut"), |
142 |
'lib2' => _("fin"), |
143 |
'type' => 'date', |
144 |
'taille' => 8, |
145 |
'where' => 'intervaldate'); |
146 |
// |
147 |
$champs['date_rejet'] = array( |
148 |
'colonne' => 'date_rejet', |
149 |
'table' => 'dossier', |
150 |
'libelle' => _('date_rejet'), |
151 |
'lib1'=> _("debut"), |
152 |
'lib2' => _("fin"), |
153 |
'type' => 'date', |
154 |
'taille' => 8, |
155 |
'where' => 'intervaldate'); |
156 |
|
157 |
// |
158 |
$champs['date_validite'] = array( |
159 |
'colonne' => 'date_validite', |
160 |
'table' => 'dossier', |
161 |
'libelle' => _('date_validite'), |
162 |
'lib1'=> _("debut"), |
163 |
'lib2' => _("fin"), |
164 |
'type' => 'date', |
165 |
'taille' => 8, |
166 |
'where' => 'intervaldate'); |
167 |
|
168 |
|
169 |
|
170 |
// |
171 |
$champs['date_complet'] = array( |
172 |
'colonne' => 'date_complet', |
173 |
'table' => 'dossier', |
174 |
'libelle' => _('date_complet'), |
175 |
'lib1'=> _("debut"), |
176 |
'lib2' => _("fin"), |
177 |
'type' => 'date', |
178 |
'taille' => 8, |
179 |
'where' => 'intervaldate'); |
180 |
// |
181 |
$champs['date_decision'] = array( |
182 |
'colonne' => 'date_decision', |
183 |
'table' => 'dossier', |
184 |
'libelle' => _('date_decision'), |
185 |
'lib1'=> _("debut"), |
186 |
'lib2' => _("fin"), |
187 |
'type' => 'date', |
188 |
'taille' => 8, |
189 |
'where' => 'intervaldate'); |
190 |
// |
191 |
$champs['date_limite'] = array( |
192 |
'colonne' => 'date_limite', |
193 |
'table' => 'dossier', |
194 |
'libelle' => _('date_limite'), |
195 |
'lib1'=> _("debut"), |
196 |
'lib2' => _("fin"), |
197 |
'type' => 'date', |
198 |
'taille' => 8, |
199 |
'where' => 'intervaldate'); |
200 |
|
201 |
|
202 |
|
203 |
|
204 |
// |
205 |
$champs['date_chantier'] = array( |
206 |
'colonne' => 'date_chantier', |
207 |
'table' => 'dossier', |
208 |
'libelle' => _('date_chantier'), |
209 |
'lib1'=> _("debut"), |
210 |
'lib2' => _("fin"), |
211 |
'type' => 'date', |
212 |
'taille' => 8, |
213 |
'where' => 'intervaldate'); |
214 |
// |
215 |
$champs['date_achevement'] = array( |
216 |
'colonne' => 'date_achevement', |
217 |
'table' => 'dossier', |
218 |
'libelle' => _('date_achevement'), |
219 |
'lib1'=> _("debut"), |
220 |
'lib2' => _("fin"), |
221 |
'type' => 'date', |
222 |
'taille' => 8, |
223 |
'where' => 'intervaldate'); |
224 |
// |
225 |
$champs['date_conformite'] = array( |
226 |
'colonne' => 'date_conformite', |
227 |
'table' => 'dossier', |
228 |
'libelle' => _('date_conformite'), |
229 |
'lib1'=> _("debut"), |
230 |
'lib2' => _("fin"), |
231 |
'type' => 'date', |
232 |
'taille' => 8, |
233 |
'where' => 'intervaldate'); |
234 |
/*Configuration de la recherche avancée*/ |
235 |
$options[] = array( |
236 |
'type' => 'search', |
237 |
'display' => true, |
238 |
'advanced' => $champs, |
239 |
'default_form' => 'advanced', |
240 |
'absolute_object' => 'dossier'); |
241 |
} |
242 |
|
243 |
/*Ajout de sous-formulaire à notre objet*/ |
244 |
$sousformulaire=array( |
245 |
//"donnees_techniques", |
246 |
"document_numerise", |
247 |
"instruction", |
248 |
"consultation", |
249 |
"lot", |
250 |
"dossier_message", |
251 |
"dossier_commission", |
252 |
//"rapport_instruction", |
253 |
"blocnote", |
254 |
"dossier_autorisation", |
255 |
); |
256 |
|
257 |
/*Ajout de paramètre à certains sous-formulaire*/ |
258 |
$sousformulaire_parameters = array( |
259 |
"consultation" => array( |
260 |
"title" => _("consultation(s)"), |
261 |
), |
262 |
"dossier_message" => array( |
263 |
"title" => _("message(s)"), |
264 |
), |
265 |
"dossier_commission" => array( |
266 |
"title" => _("commission(s)"), |
267 |
), |
268 |
"rapport_instruction" => array( |
269 |
"title" => _("rapport d'instruction"), |
270 |
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&", |
271 |
), |
272 |
"lot" => array( |
273 |
"title" => _("lot(s)"), |
274 |
), |
275 |
"donnees_techniques" => array( |
276 |
"title" => _("donnees techniques"), |
277 |
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&", |
278 |
), |
279 |
"dossier_autorisation" => array( |
280 |
"title" => _("DA"), |
281 |
"href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&", |
282 |
), |
283 |
"document_numerise" => array( |
284 |
"title" => _("Piece(s)"), |
285 |
"href" => "../app/document_numerise.view.php", |
286 |
), |
287 |
); |
288 |
?> |