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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 312 by atreal, Wed Mar 28 17:19:49 2012 UTC revision 1218 by vpihour, Fri Jan 11 15:56:33 2013 UTC
# Line 2  Line 2 
2  //$Id$  //$Id$
3  //gen openMairie le 10/02/2011 20:39  //gen openMairie le 10/02/2011 20:39
4  include('../gen/sql/pgsql/dossier.inc.php');  include('../gen/sql/pgsql/dossier.inc.php');
5  $table=DB_PREFIXE."dossier left join ".  
6         DB_PREFIXE."om_utilisateur on dossier.instructeur = om_utilisateur.om_utilisateur left join ".  /*Tables sur lesquels la requête va s'effectuer*/
7         DB_PREFIXE."avis on avis.avis=dossier.avis";  $table = DB_PREFIXE."dossier
8  $champAffiche=array("dossier",  LEFT JOIN ".DB_PREFIXE."instructeur
9                      "om_utilisateur.nom as instructeur",      ON dossier.instructeur = instructeur.instructeur
10                      "demandeur_nom",  LEFT JOIN ".DB_PREFIXE."om_utilisateur
11                      "to_char(date_demande,'DD/MM/YYYY')  as demande",      ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur
12                      "to_char(date_depot,'DD/MM/YYYY') as depot",  LEFT JOIN ".DB_PREFIXE."avis_decision
13                      "to_char(date_complet,'DD/MM/YYYY') as  complet",      ON avis_decision.avis_decision=dossier.avis_decision
14                      "to_char(date_notification_delai,'DD/MM/YYYY') as delai",  LEFT JOIN ".DB_PREFIXE."division
15                      "to_char(date_limite,'DD/MM/YYYY') as limite",      ON dossier.division=division.division";
16                      "etat","avis.libelle as avis"  
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'){  if ($retourformulaire== 'architecte'){
49      $href[0] = array("lien" => "#", "id" => "", "lib" => "", );      $tab_actions['corner']['ajouter'] = NULL;
50      $href[1] = array("lien" => "", "id" => "", "lib" => "", );      $tab_actions['left']['consulter'] = NULL;
51      $href[2] = array("lien" => "#", "id" => "", "lib" => "", );      $tab_actions['content'] =NULL;
52      $selection=" where dossier.architecte ='".$idx."'";      $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'){  if ($retourformulaire== 'travaux'){
57      $href[0] = array("lien" => "#", "id" => "", "lib" => "", );      $tab_actions['corner']['ajouter'] = NULL;
58      $href[1] = array("lien" => "", "id" => "", "lib" => "", );      $tab_actions['left']['consulter'] = NULL;
59      $href[2] = array("lien" => "#", "id" => "", "lib" => "", );      $tab_actions['content'] =NULL;
60      $selection=" where dossier.travaux ='".$idx."'";      $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("instruction",
300                          "consultation",
301                          "terrain",
302                          "blocnote",
303                          "destination_shon",
304                          "statistique",
305                          "dossier_message",
306                          "dossier_commission",
307                          "rapport_instruction",);
308    
309    /*Ajout de paramètre à certains sous-formulaire*/
310    $sousformulaire_parameters = array(
311        "consultation" => array(
312            "title" => _("consultation(s)"),
313        ),
314        "dossier_message" => array(
315            "title" => _("message(s)"),
316        ),
317        "dossier_commission" => array(
318            "title" => _("commission(s)"),
319        ),
320        "rapport_instruction" => array(
321            "title" => _("rapport d'instruction"),
322            "href" => "../app/rapport_instruction.php?idx=".((isset($idx))? $idx:""),
323        ),
324    );
325    
326    ?>

Legend:
Removed from v.312  
changed lines
  Added in v.1218

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26