/[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 1279 by nhaye, Thu Feb 21 15:58:06 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    // 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    /*Si l'on se trouve dans le formulaire dossier_instruction*/
97    if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") {
98        // 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        /*Champs pour la recherche avancée*/
108        $champs['dossier'] = array(
109            'table' => 'dossier',
110            'colonne' => 'dossier',
111            'type' => 'text',
112            'taille' => 30,
113            'libelle' => _('dossier'));
114        //
115        $champs['dossier_autorisation_type_detaille'] = array(
116            'table' => 'dossier_autorisation_type_detaille',
117            'colonne' => 'dossier_autorisation_type_detaille',
118            'type' => 'select',
119            'taille' => 30,
120            'libelle' => _('dossier_autorisation_type_detaille'));
121    
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        /*Configuration de la recherche avancée*/
323        $options[] = array(
324            'type' => 'search',
325            'display' => true,
326            'advanced'  => $champs,
327            'default_form'  => 'advanced',
328            'absolute_object' => 'dossier');
329    }
330    
331    /*Ajout de sous-formulaire à notre objet*/
332    $sousformulaire=array("donnees_techniques",
333                          "instruction",
334                          "consultation",
335                          "lot",
336                          "terrain",
337                          "blocnote",
338                          "destination_shon",
339                          "statistique",
340                          "dossier_message",
341                          "dossier_commission",
342                          "rapport_instruction",
343                          "dossier_autorisation",);
344    
345    /*Ajout de paramètre à certains sous-formulaire*/
346    $sousformulaire_parameters = array(
347        "consultation" => array(
348            "title" => _("consultation(s)"),
349        ),
350        "dossier_message" => array(
351            "title" => _("message(s)"),
352        ),
353        "dossier_commission" => array(
354            "title" => _("commission(s)"),
355        ),
356        "rapport_instruction" => array(
357            "title" => _("rapport d'instruction"),
358            "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&",
359        ),
360        "lot" => array(
361            "title" => _("lot(s)"),
362        ),
363        "donnees_techniques" => array(
364            "title" => _("donnees techniques"),
365            "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&",
366        ),
367        "dossier_autorisation" => array(
368            "href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&",
369        ),
370    );
371    ?>

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26