/[openfoncier]/trunk/sql/pgsql/dossier.inc.php
ViewVC logotype

Contents of /trunk/sql/pgsql/dossier.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1262 - (show annotations)
Thu Feb 14 17:54:53 2013 UTC (11 years, 11 months ago) by nhaye
File size: 9809 byte(s)
- obj/cerfa.class.php : surcharge de la méthode verifier afin qu'on ne puisse pas ajouter 2 cerfa avec la même période de validité et le même type de dossier d'instruction
- obj/demande.class.php : ajout du n° de cerfa au dossier d'instruction lors de sa création
- sql/pgsql/dossier.inc.php : ajout de l'onglet "donnees_techniques"
- sql/pgsql/donnees_techniques.form.inc.php : remise en ordre des champs, définition du tableau des surfaces
- obj/donnees_techniques.class.php : configuration du tableau des surfaces et affichage ou non des champs selon le cerfa

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."instructeur
9 ON dossier.instructeur = instructeur.instructeur
10 LEFT JOIN ".DB_PREFIXE."om_utilisateur
11 ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur
12 LEFT JOIN ".DB_PREFIXE."avis_decision
13 ON avis_decision.avis_decision=dossier.avis_decision
14 LEFT JOIN ".DB_PREFIXE."division
15 ON dossier.division=division.division";
16
17 /*Champs du début de la requête*/
18 $champAffiche=array(
19 'dossier.dossier as "'._("dossier").'"',
20 'dossier.demandeur_nom as "'._("demandeur_nom").'"',
21 'instructeur.nom as "'._("instructeur").'"',
22 'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"',
23 'to_char(dossier.date_depot ,\'DD/MM/YYYY\') as "'._("date_depot").'"',
24 'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"',
25 'to_char(dossier.date_notification_delai ,\'DD/MM/YYYY\') as "'._("date_notification_delai").'"',
26 'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"',
27 'etat as "'._("etat").'"',
28 'avis_decision.libelle as "'._("avis_decision").'"',
29 '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 ||
30 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
31 as "'._("enjeu").'"',
32 );
33
34 /*Tri*/
35 $tri= "order by dossier.dossier";
36
37 /*Recherche simple*/
38 $champRecherche=array( 'dossier.dossier as "'._("dossier").'"',
39 'dossier.demandeur_nom as "'._("demandeur_nom").'"',);
40
41 /*Icone*/
42 $ico = "../img/ico_dossier.png";
43
44 $edition="";
45
46 /*Si l'on se trouve dans le formulaire architecte, mettre certaines actions
47 * au tableau*/
48 if ($retourformulaire== 'architecte'){
49 $tab_actions['corner']['ajouter'] = NULL;
50 $tab_actions['left']['consulter'] = NULL;
51 $tab_actions['content'] =NULL;
52 $selection=" where dossier.architecte ='".$idx."'";
53 }
54 /*Si l'on se trouve dans le formulaire travaux, mettre certaines actions
55 * au tableau*/
56 if ($retourformulaire== 'travaux'){
57 $tab_actions['corner']['ajouter'] = NULL;
58 $tab_actions['left']['consulter'] = NULL;
59 $tab_actions['content'] =NULL;
60 $selection=" where dossier.travaux ='".$idx."'";
61 }
62
63 /*Si l'on se trouve dans le formulaire dossier_instruction*/
64 if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") {
65 // Configuration de la recherche avancee
66 if (!isset($options)) {
67 $options = array();
68 }
69 // Options pour les select de faux booléens
70 $args = array(
71 0 => array("", "Oui", "Non", ),
72 1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ),
73 );
74 /*Champs pour la recherche avancée*/
75 $champs['dossier'] = array(
76 'table' => 'dossier',
77 'colonne' => 'dossier',
78 'type' => 'text',
79 'taille' => 30,
80 'libelle' => _('dossier'));
81 //
82 $champs['dossier_autorisation_type_detaille'] = array(
83 'table' => 'dossier_autorisation_type_detaille',
84 'colonne' => 'dossier_autorisation_type_detaille',
85 'type' => 'select',
86 'taille' => 30,
87 'libelle' => _('dossier_autorisation_type_detaille'));
88
89
90
91 //
92 $champs['delegataire_nom'] = array(
93 'table' => 'dossier',
94 'colonne' => 'delegataire_nom',
95 'type' => 'text',
96 'taille' => 30,
97 'libelle' => _('nom delegataire'));
98 //
99 $champs['demandeur_nom'] = array(
100 'table' => 'dossier',
101 'colonne' => 'demandeur_nom',
102 'type' => 'text',
103 'taille' => 30,
104 'libelle' => _('nom demandeur'));
105
106
107 //
108 $champs['demandeur_societe'] = array(
109 'table' => 'dossier',
110 'colonne' => 'demandeur_societe',
111 'type' => 'text',
112 'taille' => 30,
113 'libelle' => _('demandeur_societe'));
114 //
115 $champs['parcelle'] = array(
116 'table' => 'dossier',
117 'colonne' => 'parcelle',
118 'type' => 'text',
119 'taille' => 30,
120 'libelle' => _('parcelle'));
121
122 //
123 $champs['rivoli'] = array(
124 'table' => 'dossier',
125 'colonne' => 'rivoli',
126 'type' => 'text',
127 'taille' => 30,
128 'libelle' => _('rivoli'));
129 //
130 $champs['terrain_adresse'] = array(
131 'table' => 'dossier',
132 'colonne' => 'terrain_adresse',
133 'type' => 'text',
134 'taille' => 30,
135 'libelle' => _('terrain_adresse'));
136
137
138
139
140 //
141 $champs['terrain_adresse_complement'] = array(
142 'table' => 'dossier',
143 'colonne' => 'terrain_adresse_complement',
144 'type' => 'text',
145 'taille' => 30,
146 'libelle' => _('terrain_adresse_complement'));
147 //// COL2
148
149 //
150 $champs['etat'] = array(
151 'table' => 'dossier',
152 'colonne' => 'etat',
153 'type' => 'select',
154 'libelle' => _('etat'));
155 //
156 $champs['accord_tacite'] = array(
157 'table' => 'dossier',
158 'colonne' => 'accord_tacite',
159 'type' => 'select',
160 "subtype" => "manualselect",
161 'libelle' => _('accord_tacite'),
162 "args" => $args,
163 );
164
165 //
166 $champs['travaux'] = array(
167 'table' => 'dossier',
168 'colonne' => 'travaux',
169 'type' => 'select',
170 'libelle' => _('travaux'));
171
172
173 //// COL3
174
175
176
177
178 //
179 $champs['instructeur'] = array(
180 'table' => 'dossier',
181 'colonne' => 'instructeur',
182 'type' => 'select',
183 'libelle' => _('instructeur'));
184 //
185 //$champs['architecte'] = array(
186 // 'table' => 'dossier',
187 // 'colonne' => 'architecte',
188 // 'type' => 'select',
189 // 'libelle' => _('architecte'));
190
191 //
192 $champs['date_depot'] = array(
193 'colonne' => 'date_depot',
194 'table' => 'dossier',
195 'libelle' => _('date_depot'),
196 'lib1'=> _("debut"),
197 'lib2' => _("fin"),
198 'type' => 'date',
199 'taille' => 8,
200 'where' => 'intervaldate');
201 //
202 $champs['date_rejet'] = array(
203 'colonne' => 'date_rejet',
204 'table' => 'dossier',
205 'libelle' => _('date_rejet'),
206 'lib1'=> _("debut"),
207 'lib2' => _("fin"),
208 'type' => 'date',
209 'taille' => 8,
210 'where' => 'intervaldate');
211
212 //
213 $champs['date_validite'] = array(
214 'colonne' => 'date_validite',
215 'table' => 'dossier',
216 'libelle' => _('date_validite'),
217 'lib1'=> _("debut"),
218 'lib2' => _("fin"),
219 'type' => 'date',
220 'taille' => 8,
221 'where' => 'intervaldate');
222
223
224
225 //
226 $champs['date_complet'] = array(
227 'colonne' => 'date_complet',
228 'table' => 'dossier',
229 'libelle' => _('date_complet'),
230 'lib1'=> _("debut"),
231 'lib2' => _("fin"),
232 'type' => 'date',
233 'taille' => 8,
234 'where' => 'intervaldate');
235 //
236 $champs['date_decision'] = array(
237 'colonne' => 'date_decision',
238 'table' => 'dossier',
239 'libelle' => _('date_decision'),
240 'lib1'=> _("debut"),
241 'lib2' => _("fin"),
242 'type' => 'date',
243 'taille' => 8,
244 'where' => 'intervaldate');
245 //
246 $champs['date_limite'] = array(
247 'colonne' => 'date_limite',
248 'table' => 'dossier',
249 'libelle' => _('date_limite'),
250 'lib1'=> _("debut"),
251 'lib2' => _("fin"),
252 'type' => 'date',
253 'taille' => 8,
254 'where' => 'intervaldate');
255
256
257
258
259 //
260 $champs['date_chantier'] = array(
261 'colonne' => 'date_chantier',
262 'table' => 'dossier',
263 'libelle' => _('date_chantier'),
264 'lib1'=> _("debut"),
265 'lib2' => _("fin"),
266 'type' => 'date',
267 'taille' => 8,
268 'where' => 'intervaldate');
269 //
270 $champs['date_achevement'] = array(
271 'colonne' => 'date_achevement',
272 'table' => 'dossier',
273 'libelle' => _('date_achevement'),
274 'lib1'=> _("debut"),
275 'lib2' => _("fin"),
276 'type' => 'date',
277 'taille' => 8,
278 'where' => 'intervaldate');
279 //
280 $champs['date_conformite'] = array(
281 'colonne' => 'date_conformite',
282 'table' => 'dossier',
283 'libelle' => _('date_conformite'),
284 'lib1'=> _("debut"),
285 'lib2' => _("fin"),
286 'type' => 'date',
287 'taille' => 8,
288 'where' => 'intervaldate');
289 /*Configuration de la recherche avancée*/
290 $options[] = array(
291 'type' => 'search',
292 'display' => true,
293 'advanced' => $champs,
294 'default_form' => 'advanced',
295 'absolute_object' => 'dossier');
296 }
297
298 /*Ajout de sous-formulaire à notre objet*/
299 $sousformulaire=array("donnees_techniques",
300 "instruction",
301 "consultation",
302 "lot",
303 "terrain",
304 "blocnote",
305 "destination_shon",
306 "statistique",
307 "dossier_message",
308 "dossier_commission",
309 "rapport_instruction",);
310
311 /*Ajout de paramètre à certains sous-formulaire*/
312 $sousformulaire_parameters = array(
313 "consultation" => array(
314 "title" => _("consultation(s)"),
315 ),
316 "dossier_message" => array(
317 "title" => _("message(s)"),
318 ),
319 "dossier_commission" => array(
320 "title" => _("commission(s)"),
321 ),
322 "rapport_instruction" => array(
323 "title" => _("rapport d'instruction"),
324 "href" => "../app/rapport_instruction.php?idx=".((isset($idx))? $idx:""),
325 ),
326 "lot" => array(
327 "title" => _("lot(s)"),
328 ),
329 );
330
331 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26