1 |
fraynaud |
3 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 10/02/2011 20:39 |
4 |
|
|
include('../gen/sql/pgsql/dossier.inc.php'); |
5 |
vpihour |
1058 |
|
6 |
|
|
/*Tables sur lesquels la requête va s'effectuer*/ |
7 |
fmichon |
686 |
$table = DB_PREFIXE."dossier |
8 |
nhaye |
1400 |
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 |
fmichon |
686 |
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 |
fmichon |
681 |
LEFT JOIN ".DB_PREFIXE."division |
20 |
fmichon |
686 |
ON dossier.division=division.division"; |
21 |
fmichon |
681 |
|
22 |
vpihour |
1058 |
/*Champs du début de la requête*/ |
23 |
nhaye |
471 |
$champAffiche=array( |
24 |
|
|
'dossier.dossier as "'._("dossier").'"', |
25 |
nhaye |
1400 |
'TRIM(CONCAT(personne_morale_denomination,\' \',personne_morale_nom,\' \',demandeur.particulier_nom)) as "'._("petitionaire").'"', |
26 |
nhaye |
602 |
'instructeur.nom as "'._("instructeur").'"', |
27 |
nhaye |
471 |
'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"', |
28 |
|
|
'to_char(dossier.date_depot ,\'DD/MM/YYYY\') as "'._("date_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 |
vpihour |
489 |
'avis_decision.libelle as "'._("avis_decision").'"', |
34 |
nhaye |
650 |
'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 |
nhaye |
625 |
as "'._("enjeu").'"', |
37 |
nhaye |
471 |
); |
38 |
nhaye |
467 |
|
39 |
vpihour |
1058 |
/*Tri*/ |
40 |
nhaye |
467 |
$tri= "order by dossier.dossier"; |
41 |
|
|
|
42 |
vpihour |
1058 |
/*Recherche simple*/ |
43 |
fmichon |
1081 |
$champRecherche=array( 'dossier.dossier as "'._("dossier").'"', |
44 |
nhaye |
1400 |
'personne_morale_denomination as "'._("personne_morale_denomination").'"', |
45 |
|
|
'particulier_nom as "'._("particulier_nom").'"', |
46 |
|
|
); |
47 |
nhaye |
467 |
|
48 |
vpihour |
1058 |
/*Icone*/ |
49 |
nhaye |
467 |
$ico = "../img/ico_dossier.png"; |
50 |
|
|
|
51 |
|
|
$edition=""; |
52 |
|
|
|
53 |
vpihour |
1058 |
/*Si l'on se trouve dans le formulaire dossier_instruction*/ |
54 |
fmichon |
647 |
if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") { |
55 |
fmichon |
476 |
// 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 |
vpihour |
1058 |
/*Champs pour la recherche avancée*/ |
65 |
fmichon |
476 |
$champs['dossier'] = array( |
66 |
|
|
'table' => 'dossier', |
67 |
|
|
'colonne' => 'dossier', |
68 |
|
|
'type' => 'text', |
69 |
|
|
'taille' => 30, |
70 |
|
|
'libelle' => _('dossier')); |
71 |
|
|
// |
72 |
nhaye |
1138 |
$champs['dossier_autorisation_type_detaille'] = array( |
73 |
|
|
'table' => 'dossier_autorisation_type_detaille', |
74 |
|
|
'colonne' => 'dossier_autorisation_type_detaille', |
75 |
fmichon |
476 |
'type' => 'select', |
76 |
|
|
'taille' => 30, |
77 |
nhaye |
1138 |
'libelle' => _('dossier_autorisation_type_detaille')); |
78 |
fmichon |
476 |
|
79 |
|
|
// |
80 |
|
|
$champs['parcelle'] = array( |
81 |
|
|
'table' => 'dossier', |
82 |
|
|
'colonne' => 'parcelle', |
83 |
|
|
'type' => 'text', |
84 |
|
|
'taille' => 30, |
85 |
|
|
'libelle' => _('parcelle')); |
86 |
|
|
//// COL2 |
87 |
|
|
|
88 |
|
|
// |
89 |
|
|
$champs['etat'] = array( |
90 |
|
|
'table' => 'dossier', |
91 |
|
|
'colonne' => 'etat', |
92 |
|
|
'type' => 'select', |
93 |
|
|
'libelle' => _('etat')); |
94 |
|
|
// |
95 |
|
|
$champs['accord_tacite'] = array( |
96 |
|
|
'table' => 'dossier', |
97 |
|
|
'colonne' => 'accord_tacite', |
98 |
|
|
'type' => 'select', |
99 |
|
|
"subtype" => "manualselect", |
100 |
|
|
'libelle' => _('accord_tacite'), |
101 |
|
|
"args" => $args, |
102 |
|
|
); |
103 |
|
|
|
104 |
|
|
//// COL3 |
105 |
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
// |
110 |
|
|
$champs['instructeur'] = array( |
111 |
|
|
'table' => 'dossier', |
112 |
|
|
'colonne' => 'instructeur', |
113 |
|
|
'type' => 'select', |
114 |
|
|
'libelle' => _('instructeur')); |
115 |
|
|
// |
116 |
|
|
//$champs['architecte'] = array( |
117 |
|
|
// 'table' => 'dossier', |
118 |
|
|
// 'colonne' => 'architecte', |
119 |
|
|
// 'type' => 'select', |
120 |
|
|
// 'libelle' => _('architecte')); |
121 |
|
|
|
122 |
|
|
// |
123 |
|
|
$champs['date_depot'] = array( |
124 |
|
|
'colonne' => 'date_depot', |
125 |
|
|
'table' => 'dossier', |
126 |
|
|
'libelle' => _('date_depot'), |
127 |
|
|
'lib1'=> _("debut"), |
128 |
|
|
'lib2' => _("fin"), |
129 |
|
|
'type' => 'date', |
130 |
|
|
'taille' => 8, |
131 |
|
|
'where' => 'intervaldate'); |
132 |
|
|
// |
133 |
|
|
$champs['date_rejet'] = array( |
134 |
|
|
'colonne' => 'date_rejet', |
135 |
|
|
'table' => 'dossier', |
136 |
|
|
'libelle' => _('date_rejet'), |
137 |
|
|
'lib1'=> _("debut"), |
138 |
|
|
'lib2' => _("fin"), |
139 |
|
|
'type' => 'date', |
140 |
|
|
'taille' => 8, |
141 |
|
|
'where' => 'intervaldate'); |
142 |
|
|
|
143 |
|
|
// |
144 |
|
|
$champs['date_validite'] = array( |
145 |
|
|
'colonne' => 'date_validite', |
146 |
|
|
'table' => 'dossier', |
147 |
|
|
'libelle' => _('date_validite'), |
148 |
|
|
'lib1'=> _("debut"), |
149 |
|
|
'lib2' => _("fin"), |
150 |
|
|
'type' => 'date', |
151 |
|
|
'taille' => 8, |
152 |
|
|
'where' => 'intervaldate'); |
153 |
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
|
|
// |
157 |
|
|
$champs['date_complet'] = array( |
158 |
|
|
'colonne' => 'date_complet', |
159 |
|
|
'table' => 'dossier', |
160 |
|
|
'libelle' => _('date_complet'), |
161 |
|
|
'lib1'=> _("debut"), |
162 |
|
|
'lib2' => _("fin"), |
163 |
|
|
'type' => 'date', |
164 |
|
|
'taille' => 8, |
165 |
|
|
'where' => 'intervaldate'); |
166 |
|
|
// |
167 |
|
|
$champs['date_decision'] = array( |
168 |
|
|
'colonne' => 'date_decision', |
169 |
|
|
'table' => 'dossier', |
170 |
|
|
'libelle' => _('date_decision'), |
171 |
|
|
'lib1'=> _("debut"), |
172 |
|
|
'lib2' => _("fin"), |
173 |
|
|
'type' => 'date', |
174 |
|
|
'taille' => 8, |
175 |
|
|
'where' => 'intervaldate'); |
176 |
|
|
// |
177 |
|
|
$champs['date_limite'] = array( |
178 |
|
|
'colonne' => 'date_limite', |
179 |
|
|
'table' => 'dossier', |
180 |
|
|
'libelle' => _('date_limite'), |
181 |
|
|
'lib1'=> _("debut"), |
182 |
|
|
'lib2' => _("fin"), |
183 |
|
|
'type' => 'date', |
184 |
|
|
'taille' => 8, |
185 |
|
|
'where' => 'intervaldate'); |
186 |
|
|
|
187 |
|
|
|
188 |
|
|
|
189 |
|
|
|
190 |
|
|
// |
191 |
|
|
$champs['date_chantier'] = array( |
192 |
|
|
'colonne' => 'date_chantier', |
193 |
|
|
'table' => 'dossier', |
194 |
|
|
'libelle' => _('date_chantier'), |
195 |
|
|
'lib1'=> _("debut"), |
196 |
|
|
'lib2' => _("fin"), |
197 |
|
|
'type' => 'date', |
198 |
|
|
'taille' => 8, |
199 |
|
|
'where' => 'intervaldate'); |
200 |
|
|
// |
201 |
|
|
$champs['date_achevement'] = array( |
202 |
|
|
'colonne' => 'date_achevement', |
203 |
|
|
'table' => 'dossier', |
204 |
|
|
'libelle' => _('date_achevement'), |
205 |
|
|
'lib1'=> _("debut"), |
206 |
|
|
'lib2' => _("fin"), |
207 |
|
|
'type' => 'date', |
208 |
|
|
'taille' => 8, |
209 |
|
|
'where' => 'intervaldate'); |
210 |
|
|
// |
211 |
|
|
$champs['date_conformite'] = array( |
212 |
|
|
'colonne' => 'date_conformite', |
213 |
|
|
'table' => 'dossier', |
214 |
|
|
'libelle' => _('date_conformite'), |
215 |
|
|
'lib1'=> _("debut"), |
216 |
|
|
'lib2' => _("fin"), |
217 |
|
|
'type' => 'date', |
218 |
|
|
'taille' => 8, |
219 |
|
|
'where' => 'intervaldate'); |
220 |
vpihour |
1058 |
/*Configuration de la recherche avancée*/ |
221 |
fmichon |
476 |
$options[] = array( |
222 |
|
|
'type' => 'search', |
223 |
|
|
'display' => true, |
224 |
|
|
'advanced' => $champs, |
225 |
|
|
'default_form' => 'advanced', |
226 |
|
|
'absolute_object' => 'dossier'); |
227 |
|
|
} |
228 |
|
|
|
229 |
vpihour |
1058 |
/*Ajout de sous-formulaire à notre objet*/ |
230 |
nhaye |
1262 |
$sousformulaire=array("donnees_techniques", |
231 |
|
|
"instruction", |
232 |
nhaye |
467 |
"consultation", |
233 |
vpihour |
1233 |
"lot", |
234 |
fmichon |
1087 |
"dossier_message", |
235 |
vpihour |
1218 |
"dossier_commission", |
236 |
vpihour |
1272 |
"rapport_instruction", |
237 |
|
|
"dossier_autorisation",); |
238 |
fmichon |
872 |
|
239 |
vpihour |
1058 |
/*Ajout de paramètre à certains sous-formulaire*/ |
240 |
fmichon |
872 |
$sousformulaire_parameters = array( |
241 |
|
|
"consultation" => array( |
242 |
|
|
"title" => _("consultation(s)"), |
243 |
|
|
), |
244 |
|
|
"dossier_message" => array( |
245 |
|
|
"title" => _("message(s)"), |
246 |
|
|
), |
247 |
fmichon |
1087 |
"dossier_commission" => array( |
248 |
|
|
"title" => _("commission(s)"), |
249 |
|
|
), |
250 |
vpihour |
1218 |
"rapport_instruction" => array( |
251 |
|
|
"title" => _("rapport d'instruction"), |
252 |
vpihour |
1265 |
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&", |
253 |
vpihour |
1218 |
), |
254 |
vpihour |
1233 |
"lot" => array( |
255 |
|
|
"title" => _("lot(s)"), |
256 |
|
|
), |
257 |
vpihour |
1265 |
"donnees_techniques" => array( |
258 |
|
|
"title" => _("donnees techniques"), |
259 |
|
|
"href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&", |
260 |
|
|
), |
261 |
nhaye |
1279 |
"dossier_autorisation" => array( |
262 |
|
|
"href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&", |
263 |
|
|
), |
264 |
fmichon |
872 |
); |
265 |
fmichon |
476 |
?> |