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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1279 - (hide annotations)
Thu Feb 21 15:58:06 2013 UTC (11 years, 11 months ago) by nhaye
File size: 11600 byte(s)
Ajout d'un script qui inclus 2 soustab (dossier et dossier_autorisation),
configuration de ces tableaux

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26