/[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 1355 - (hide annotations)
Mon Mar 11 13:57:07 2013 UTC (11 years, 10 months ago) by vpihour
File size: 10055 byte(s)
Suppression de la table destination_shon

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
64 vpihour 1058 /*Si l'on se trouve dans le formulaire dossier_instruction*/
65 fmichon 647 if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") {
66 fmichon 476 // Configuration de la recherche avancee
67     if (!isset($options)) {
68     $options = array();
69     }
70     // Options pour les select de faux booléens
71     $args = array(
72     0 => array("", "Oui", "Non", ),
73     1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ),
74     );
75 vpihour 1058 /*Champs pour la recherche avancée*/
76 fmichon 476 $champs['dossier'] = array(
77     'table' => 'dossier',
78     'colonne' => 'dossier',
79     'type' => 'text',
80     'taille' => 30,
81     'libelle' => _('dossier'));
82     //
83 nhaye 1138 $champs['dossier_autorisation_type_detaille'] = array(
84     'table' => 'dossier_autorisation_type_detaille',
85     'colonne' => 'dossier_autorisation_type_detaille',
86 fmichon 476 'type' => 'select',
87     'taille' => 30,
88 nhaye 1138 'libelle' => _('dossier_autorisation_type_detaille'));
89 fmichon 476
90    
91    
92     //
93     $champs['delegataire_nom'] = array(
94     'table' => 'dossier',
95     'colonne' => 'delegataire_nom',
96     'type' => 'text',
97     'taille' => 30,
98     'libelle' => _('nom delegataire'));
99     //
100     $champs['demandeur_nom'] = array(
101     'table' => 'dossier',
102     'colonne' => 'demandeur_nom',
103     'type' => 'text',
104     'taille' => 30,
105     'libelle' => _('nom demandeur'));
106    
107    
108     //
109     $champs['demandeur_societe'] = array(
110     'table' => 'dossier',
111     'colonne' => 'demandeur_societe',
112     'type' => 'text',
113     'taille' => 30,
114     'libelle' => _('demandeur_societe'));
115     //
116     $champs['parcelle'] = array(
117     'table' => 'dossier',
118     'colonne' => 'parcelle',
119     'type' => 'text',
120     'taille' => 30,
121     'libelle' => _('parcelle'));
122    
123     //
124     $champs['rivoli'] = array(
125     'table' => 'dossier',
126     'colonne' => 'rivoli',
127     'type' => 'text',
128     'taille' => 30,
129     'libelle' => _('rivoli'));
130     //
131     $champs['terrain_adresse'] = array(
132     'table' => 'dossier',
133     'colonne' => 'terrain_adresse',
134     'type' => 'text',
135     'taille' => 30,
136     'libelle' => _('terrain_adresse'));
137    
138    
139    
140    
141     //
142     $champs['terrain_adresse_complement'] = array(
143     'table' => 'dossier',
144     'colonne' => 'terrain_adresse_complement',
145     'type' => 'text',
146     'taille' => 30,
147     'libelle' => _('terrain_adresse_complement'));
148     //// COL2
149    
150     //
151     $champs['etat'] = array(
152     'table' => 'dossier',
153     'colonne' => 'etat',
154     'type' => 'select',
155     'libelle' => _('etat'));
156     //
157     $champs['accord_tacite'] = array(
158     'table' => 'dossier',
159     'colonne' => 'accord_tacite',
160     'type' => 'select',
161     "subtype" => "manualselect",
162     'libelle' => _('accord_tacite'),
163     "args" => $args,
164     );
165    
166     //
167     $champs['travaux'] = array(
168     'table' => 'dossier',
169     'colonne' => 'travaux',
170     'type' => 'select',
171     'libelle' => _('travaux'));
172    
173    
174     //// COL3
175    
176    
177    
178    
179     //
180     $champs['instructeur'] = array(
181     'table' => 'dossier',
182     'colonne' => 'instructeur',
183     'type' => 'select',
184     'libelle' => _('instructeur'));
185     //
186     //$champs['architecte'] = array(
187     // 'table' => 'dossier',
188     // 'colonne' => 'architecte',
189     // 'type' => 'select',
190     // 'libelle' => _('architecte'));
191    
192     //
193     $champs['date_depot'] = array(
194     'colonne' => 'date_depot',
195     'table' => 'dossier',
196     'libelle' => _('date_depot'),
197     'lib1'=> _("debut"),
198     'lib2' => _("fin"),
199     'type' => 'date',
200     'taille' => 8,
201     'where' => 'intervaldate');
202     //
203     $champs['date_rejet'] = array(
204     'colonne' => 'date_rejet',
205     'table' => 'dossier',
206     'libelle' => _('date_rejet'),
207     'lib1'=> _("debut"),
208     'lib2' => _("fin"),
209     'type' => 'date',
210     'taille' => 8,
211     'where' => 'intervaldate');
212    
213     //
214     $champs['date_validite'] = array(
215     'colonne' => 'date_validite',
216     'table' => 'dossier',
217     'libelle' => _('date_validite'),
218     'lib1'=> _("debut"),
219     'lib2' => _("fin"),
220     'type' => 'date',
221     'taille' => 8,
222     'where' => 'intervaldate');
223    
224    
225    
226     //
227     $champs['date_complet'] = array(
228     'colonne' => 'date_complet',
229     'table' => 'dossier',
230     'libelle' => _('date_complet'),
231     'lib1'=> _("debut"),
232     'lib2' => _("fin"),
233     'type' => 'date',
234     'taille' => 8,
235     'where' => 'intervaldate');
236     //
237     $champs['date_decision'] = array(
238     'colonne' => 'date_decision',
239     'table' => 'dossier',
240     'libelle' => _('date_decision'),
241     'lib1'=> _("debut"),
242     'lib2' => _("fin"),
243     'type' => 'date',
244     'taille' => 8,
245     'where' => 'intervaldate');
246     //
247     $champs['date_limite'] = array(
248     'colonne' => 'date_limite',
249     'table' => 'dossier',
250     'libelle' => _('date_limite'),
251     'lib1'=> _("debut"),
252     'lib2' => _("fin"),
253     'type' => 'date',
254     'taille' => 8,
255     'where' => 'intervaldate');
256    
257    
258    
259    
260     //
261     $champs['date_chantier'] = array(
262     'colonne' => 'date_chantier',
263     'table' => 'dossier',
264     'libelle' => _('date_chantier'),
265     'lib1'=> _("debut"),
266     'lib2' => _("fin"),
267     'type' => 'date',
268     'taille' => 8,
269     'where' => 'intervaldate');
270     //
271     $champs['date_achevement'] = array(
272     'colonne' => 'date_achevement',
273     'table' => 'dossier',
274     'libelle' => _('date_achevement'),
275     'lib1'=> _("debut"),
276     'lib2' => _("fin"),
277     'type' => 'date',
278     'taille' => 8,
279     'where' => 'intervaldate');
280     //
281     $champs['date_conformite'] = array(
282     'colonne' => 'date_conformite',
283     'table' => 'dossier',
284     'libelle' => _('date_conformite'),
285     'lib1'=> _("debut"),
286     'lib2' => _("fin"),
287     'type' => 'date',
288     'taille' => 8,
289     'where' => 'intervaldate');
290 vpihour 1058 /*Configuration de la recherche avancée*/
291 fmichon 476 $options[] = array(
292     'type' => 'search',
293     'display' => true,
294     'advanced' => $champs,
295     'default_form' => 'advanced',
296     'absolute_object' => 'dossier');
297     }
298    
299 vpihour 1058 /*Ajout de sous-formulaire à notre objet*/
300 nhaye 1262 $sousformulaire=array("donnees_techniques",
301     "instruction",
302 nhaye 467 "consultation",
303 vpihour 1233 "lot",
304 fmichon 1087 "dossier_message",
305 vpihour 1218 "dossier_commission",
306 vpihour 1272 "rapport_instruction",
307     "dossier_autorisation",);
308 fmichon 872
309 vpihour 1058 /*Ajout de paramètre à certains sous-formulaire*/
310 fmichon 872 $sousformulaire_parameters = array(
311     "consultation" => array(
312     "title" => _("consultation(s)"),
313     ),
314     "dossier_message" => array(
315     "title" => _("message(s)"),
316     ),
317 fmichon 1087 "dossier_commission" => array(
318     "title" => _("commission(s)"),
319     ),
320 vpihour 1218 "rapport_instruction" => array(
321     "title" => _("rapport d'instruction"),
322 vpihour 1265 "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&",
323 vpihour 1218 ),
324 vpihour 1233 "lot" => array(
325     "title" => _("lot(s)"),
326     ),
327 vpihour 1265 "donnees_techniques" => array(
328     "title" => _("donnees techniques"),
329     "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&",
330     ),
331 nhaye 1279 "dossier_autorisation" => array(
332     "href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&",
333     ),
334 fmichon 872 );
335 fmichon 476 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26