/[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 1138 - (hide annotations)
Thu Jan 3 15:18:21 2013 UTC (12 years, 1 month ago) by nhaye
File size: 9460 byte(s)
Suppression de la colonne nature de la table dossier,
correction des requètes sql faisant appel à cette colonne.

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 vpihour 1058 /*Si l'on se trouve dans le formulaire dossier_instruction*/
64 fmichon 647 if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") {
65 fmichon 476 // 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 vpihour 1058 /*Champs pour la recherche avancée*/
75 fmichon 476 $champs['dossier'] = array(
76     'table' => 'dossier',
77     'colonne' => 'dossier',
78     'type' => 'text',
79     'taille' => 30,
80     'libelle' => _('dossier'));
81     //
82 nhaye 1138 $champs['dossier_autorisation_type_detaille'] = array(
83     'table' => 'dossier_autorisation_type_detaille',
84     'colonne' => 'dossier_autorisation_type_detaille',
85 fmichon 476 'type' => 'select',
86     'taille' => 30,
87 nhaye 1138 'libelle' => _('dossier_autorisation_type_detaille'));
88 fmichon 476
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 vpihour 1058 /*Configuration de la recherche avancée*/
290 fmichon 476 $options[] = array(
291     'type' => 'search',
292     'display' => true,
293     'advanced' => $champs,
294     'default_form' => 'advanced',
295     'absolute_object' => 'dossier');
296     }
297    
298 vpihour 1058 /*Ajout de sous-formulaire à notre objet*/
299 nhaye 467 $sousformulaire=array("instruction",
300     "consultation",
301     "terrain",
302     "blocnote",
303     "destination_shon",
304 mlimic 586 "statistique",
305 fmichon 1087 "dossier_message",
306     "dossier_commission",);
307 fmichon 872
308 vpihour 1058 /*Ajout de paramètre à certains sous-formulaire*/
309 fmichon 872 $sousformulaire_parameters = array(
310     "consultation" => array(
311     "title" => _("consultation(s)"),
312     ),
313     "dossier_message" => array(
314     "title" => _("message(s)"),
315     ),
316 fmichon 1087 "dossier_commission" => array(
317     "title" => _("commission(s)"),
318     ),
319 fmichon 872 );
320    
321 fmichon 476 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26