/[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 1058 - (hide annotations)
Thu Dec 13 15:00:27 2012 UTC (12 years, 1 month ago) by vpihour
File size: 9147 byte(s)
Ajout de commentaires

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26