/[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 467 by nhaye, Wed Oct 3 09:42:47 2012 UTC revision 2737 by atreal, Thu Feb 13 19:40:16 2014 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');
 $table=DB_PREFIXE."dossier left join ".  
        DB_PREFIXE."om_utilisateur on dossier.instructeur = om_utilisateur.om_utilisateur left join ".  
        DB_PREFIXE."avis on avis.avis=dossier.avis";  
 $champAffiche=array("dossier",  
                     "demandeur_nom as nom",  
                     "om_utilisateur.nom as instructeur",  
                     "to_char(date_demande,'DD/MM/YYYY')  as demande",  
                     "to_char(date_depot,'DD/MM/YYYY') as depot",  
                     "to_char(date_complet,'DD/MM/YYYY') as  complet",  
                     "to_char(date_notification_delai,'DD/MM/YYYY') as delai",  
                     "to_char(date_limite,'DD/MM/YYYY') as limite",  
                     "etat","avis.libelle as avis"  
                     );  
5    
6  $tri= "order by dossier.dossier";  /*Tables sur lesquels la requête va s'effectuer*/
7    $table = DB_PREFIXE."dossier
8    LEFT JOIN ".DB_PREFIXE."lien_dossier_demandeur
9            ON lien_dossier_demandeur.dossier=dossier.dossier
10                AND lien_dossier_demandeur.petitionnaire_principal IS TRUE
11    LEFT JOIN ".DB_PREFIXE."demandeur
12        ON lien_dossier_demandeur.demandeur=demandeur.demandeur
13    LEFT JOIN ".DB_PREFIXE."instructeur
14        ON dossier.instructeur = instructeur.instructeur
15    LEFT JOIN ".DB_PREFIXE."om_utilisateur
16        ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur
17    LEFT JOIN ".DB_PREFIXE."avis_decision
18        ON avis_decision.avis_decision=dossier.avis_decision
19    LEFT JOIN ".DB_PREFIXE."division
20        ON dossier.division=division.division";
21    
22  $champRecherche=array("dossier","demandeur_nom");  /*Champs du début de la requête*/
23    $champAffiche=array(
24        'dossier.dossier as "'._("dossier").'"',
25        'TRIM(CONCAT(personne_morale_denomination,\' \',personne_morale_nom,\' \',demandeur.particulier_nom)) as "'._("petitionaire").'"',
26        'instructeur.nom as "'._("instructeur").'"',
27        'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"',
28        'dossier.date_dernier_depot as "'._("date_dernier_depot").'"',
29        'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"',
30        'to_char(dossier.date_notification_delai ,\'DD/MM/YYYY\') as "'._("date_notification_delai").'"',
31        'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"',
32        'etat as "'._("etat").'"',
33        'avis_decision.libelle as "'._("avis_decision").'"',
34        '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 ||
35         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
36         as "'._("enjeu").'"',
37    );
38    
39    /*Tri*/
40    $triOrder= "order by dossier.dossier";
41    $tri = $triOrder;
42    
43    /*Recherche simple*/
44    $champRecherche=array(    'dossier.dossier as "'._("dossier").'"',
45        'personne_morale_denomination as "'._("personne_morale_denomination").'"',
46        'particulier_nom as "'._("particulier_nom").'"',
47        );
48    
49    /*Icone*/
50  $ico = "../img/ico_dossier.png";  $ico = "../img/ico_dossier.png";
51    
52  $edition="";  $edition="";
53    
54  if ($retourformulaire== 'architecte'){  /*Si l'on se trouve dans le formulaire dossier_instruction*/
55      $tab_actions['corner']['ajouter'] = NULL;  if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") {
56      $tab_actions['left']['consulter'] = NULL;      // Configuration de la recherche avancee
57      $tab_actions['content'] =NULL;      if (!isset($options)) {
58      $selection=" where dossier.architecte ='".$idx."'";          $options = array();
59        }
60        // Options pour les select de faux booléens
61        $args = array(
62            0 => array("", "Oui", "Non", ),
63            1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ),
64        );
65        /*Champs pour la recherche avancée*/
66        $champs['dossier'] = array(
67            'table' => 'dossier',
68            'colonne' => 'dossier',
69            'type' => 'text',
70            'taille' => 30,
71            'libelle' => _('dossier'));
72        //
73        $champs['dossier_autorisation_type_detaille'] = array(
74            'table' => 'dossier_autorisation_type_detaille',
75            'colonne' => 'dossier_autorisation_type_detaille',
76            'type' => 'select',
77            'taille' => 30,
78            'libelle' => _('dossier_autorisation_type_detaille'));
79    
80        $champs['particulier'] = array(  
81            'table' => 'demandeur',
82            'colonne' => array('particulier_nom','particulier_prenom','particulier_nom','personne_morale_nom','personne_morale_prenom','personne_morale_denomination'),
83            'type' => 'text',
84            'taille' => 30,
85            'libelle' => _('Demandeur'));        
86        //
87        $champs['parcelle'] = array(
88            'table' => 'dossier_parcelle',
89            'where' => 'injoin',
90            'tablejoin' => 'INNER JOIN (SELECT DISTINCT dossier FROM '.DB_PREFIXE.'dossier_parcelle WHERE lower(dossier_parcelle.libelle) like %s ) AS A1 ON A1.dossier = dossier.dossier' ,
91            'colonne' => 'libelle',
92            'type' => 'text',
93            'taille' => 30,
94            'libelle' => _('parcelle'));
95        //// COL2
96    
97    
98        //
99        $champs['etat'] = array(
100            'table' => 'dossier',
101            'colonne' => 'etat',
102            'type' => 'select',
103            'libelle' => _('etat'));
104        //
105        $champs['accord_tacite'] = array(
106            'table' => 'dossier',
107            'colonne' => 'accord_tacite',
108            'type' => 'select',
109            "subtype" => "manualselect",
110            'libelle' => _('accord_tacite'),
111            "args" => $args,
112        );
113    
114        //// COL3
115    
116    
117    
118    
119        //
120        $champs['instructeur'] = array(
121            'table' => 'dossier',
122            'colonne' => 'instructeur',
123            'type' => 'select',
124            'libelle' => _('instructeur'));
125        //
126        //$champs['architecte'] = array(
127        //    'table' => 'dossier',
128        //    'colonne' => 'architecte',
129        //    'type' => 'select',
130        //    'libelle' => _('architecte'));
131    
132        //
133        $champs['date_depot'] = array(
134            'colonne' => 'date_depot',
135            'table' => 'dossier',
136            'libelle' => _('date_depot'),
137            'lib1'=> _("debut"),
138            'lib2' => _("fin"),
139            'type' => 'date',
140            'taille' => 8,
141            'where' => 'intervaldate');
142        //
143        $champs['date_rejet'] = array(
144            'colonne' => 'date_rejet',
145            'table' => 'dossier',
146            'libelle' => _('date_rejet'),
147            'lib1'=> _("debut"),
148            'lib2' => _("fin"),
149            'type' => 'date',
150            'taille' => 8,
151            'where' => 'intervaldate');
152    
153       //
154        $champs['date_validite'] = array(
155            'colonne' => 'date_validite',
156            'table' => 'dossier',
157            'libelle' => _('date_validite'),
158            'lib1'=> _("debut"),
159            'lib2' => _("fin"),
160            'type' => 'date',
161            'taille' => 8,
162            'where' => 'intervaldate');
163    
164    
165    
166        //
167        $champs['date_complet'] = array(
168            'colonne' => 'date_complet',
169            'table' => 'dossier',
170            'libelle' => _('date_complet'),
171            'lib1'=> _("debut"),
172            'lib2' => _("fin"),
173            'type' => 'date',
174            'taille' => 8,
175            'where' => 'intervaldate');
176        //
177        $champs['date_decision'] = array(
178            'colonne' => 'date_decision',
179            'table' => 'dossier',
180            'libelle' => _('date_decision'),
181            'lib1'=> _("debut"),
182            'lib2' => _("fin"),
183            'type' => 'date',
184            'taille' => 8,
185            'where' => 'intervaldate');
186        //
187        $champs['date_limite'] = array(
188            'colonne' => 'date_limite',
189            'table' => 'dossier',
190            'libelle' => _('date_limite'),
191            'lib1'=> _("debut"),
192            'lib2' => _("fin"),
193            'type' => 'date',
194            'taille' => 8,
195            'where' => 'intervaldate');
196    
197    
198    
199    
200        //
201        $champs['date_chantier'] = array(
202            'colonne' => 'date_chantier',
203            'table' => 'dossier',
204            'libelle' => _('date_chantier'),
205            'lib1'=> _("debut"),
206            'lib2' => _("fin"),
207            'type' => 'date',
208            'taille' => 8,
209            'where' => 'intervaldate');
210        //
211        $champs['date_achevement'] = array(
212            'colonne' => 'date_achevement',
213            'table' => 'dossier',
214            'libelle' => _('date_achevement'),
215            'lib1'=> _("debut"),
216            'lib2' => _("fin"),
217            'type' => 'date',
218            'taille' => 8,
219            'where' => 'intervaldate');
220        //
221        $champs['date_conformite'] = array(
222            'colonne' => 'date_conformite',
223            'table' => 'dossier',
224            'libelle' => _('date_conformite'),
225            'lib1'=> _("debut"),
226            'lib2' => _("fin"),
227            'type' => 'date',
228            'taille' => 8,
229            'where' => 'intervaldate');
230        
231        /*Configuration de la recherche avancée*/
232        $options[] = array(
233            'type' => 'search',
234            'display' => true,
235            'advanced'  => $champs,
236            'default_form'  => 'advanced',
237            'absolute_object' => 'dossier');
238    
239        /* désactivation du sélecteur de pages */
240        $options[] = array(
241            'type' => 'pagination_select',
242            'display' => '');
243  }  }
244  if ($retourformulaire== 'travaux'){  
245      $tab_actions['corner']['ajouter'] = NULL;  /*Ajout de sous-formulaire à notre objet*/
246      $tab_actions['left']['consulter'] = NULL;  $sousformulaire=array(
247      $tab_actions['content'] =NULL;      //"donnees_techniques",
248      $selection=" where dossier.travaux ='".$idx."'";      "document_numerise",
249        "instruction",
250        "consultation",
251        "lot",
252        "dossier_message",
253        "dossier_commission",
254        //"rapport_instruction",
255        "blocnote",
256        "dossier_autorisation",
257    );
258    
259    /*Ajout de paramètre à certains sous-formulaire*/
260    $sousformulaire_parameters = array(
261        "consultation" => array(
262            "title" => _("consultation(s)"),
263        ),
264        "dossier_message" => array(
265            "title" => _("message(s)"),
266        ),
267        "dossier_commission" => array(
268            "title" => _("commission(s)"),
269        ),
270        "rapport_instruction" => array(
271            "title" => _("rapport d'instruction"),
272            "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&",
273        ),
274        "lot" => array(
275            "title" => _("lot(s)"),
276        ),
277        "donnees_techniques" => array(
278            "title" => _("donnees techniques"),
279            "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&",
280        ),
281        "dossier_autorisation" => array(
282            "title" => _("DA"),
283            "href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&",
284        ),
285        "document_numerise" => array(
286            "title" => _("Piece(s)"),
287            "href" => "../app/document_numerise.view.php",
288        ),
289    );
290    
291    // Si le paramètre 'option_sig' n'est pas désactivé
292    if ($f->getParameter('option_sig') != 'aucun') {
293        // On redéclare les sousformulaire
294        $sousformulaire=array(
295            //"donnees_techniques",
296            "document_numerise",
297            "dossier_contrainte",
298            "instruction",
299            "consultation",
300            "lot",
301            "dossier_message",
302            "dossier_commission",
303            //"rapport_instruction",
304            "blocnote",
305            "dossier_autorisation",
306        );
307        // On modifie le lien du paramètre dossier_contrainte
308        $sousformulaire_parameters["dossier_contrainte"] = array(
309                "title" => _("Contrainte(s)"),
310                "href" => "../app/dossier_contrainte.view.php",
311        );
312  }  }
 $sousformulaire=array("instruction",  
                       "consultation",  
                       "terrain",  
                       "blocnote",  
                       "destination_shon",  
                       "statistique");  
 ?>  
313    
314    ?>

Legend:
Removed from v.467  
changed lines
  Added in v.2737

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26