/[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 471 by nhaye, Wed Oct 3 16:51:37 2012 UTC revision 1988 by vpihour, Wed Jun 5 16:04:44 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    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    /*Champs du début de la requête*/
23  $champAffiche=array(  $champAffiche=array(
24      'dossier.dossier as "'._("dossier").'"',      'dossier.dossier as "'._("dossier").'"',
25      'dossier.demandeur_nom as "'._("demandeur_nom").'"',      'TRIM(CONCAT(personne_morale_denomination,\' \',personne_morale_nom,\' \',demandeur.particulier_nom)) as "'._("petitionaire").'"',
26      'om_utilisateur.nom as "'._("instructeur").'"',      'instructeur.nom as "'._("instructeur").'"',
27      'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"',      'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"',
28      'to_char(dossier.date_depot ,\'DD/MM/YYYY\') as "'._("date_depot").'"',      'dossier.date_dernier_depot as "'._("date_dernier_depot").'"',
29      'to_char(dossier.date_complet ,\'DD/MM/YYYY\') as "'._("date_complet").'"',      '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").'"',      '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").'"',      'to_char(dossier.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"',
32      'etat as "'._("etat").'"',      'etat as "'._("etat").'"',
33      'avis.libelle as "'._("avis").'"',      '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  $tri= "order by dossier.dossier";  $tri= "order by dossier.dossier";
41    
42  $champRecherche=array("dossier","demandeur_nom");  /*Recherche simple*/
43    $champRecherche=array(    'dossier.dossier as "'._("dossier").'"',
44        'personne_morale_denomination as "'._("personne_morale_denomination").'"',
45        'particulier_nom as "'._("particulier_nom").'"',
46        );
47    
48    /*Icone*/
49  $ico = "../img/ico_dossier.png";  $ico = "../img/ico_dossier.png";
50    
51  $edition="";  $edition="";
52    
53  if ($retourformulaire== 'architecte'){  /*Si l'on se trouve dans le formulaire dossier_instruction*/
54      $tab_actions['corner']['ajouter'] = NULL;  if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") {
55      $tab_actions['left']['consulter'] = NULL;      // Configuration de la recherche avancee
56      $tab_actions['content'] =NULL;      if (!isset($options)) {
57      $selection=" where dossier.architecte ='".$idx."'";          $options = array();
58  }      }
59  if ($retourformulaire== 'travaux'){      // Options pour les select de faux booléens
60      $tab_actions['corner']['ajouter'] = NULL;      $args = array(
61      $tab_actions['left']['consulter'] = NULL;          0 => array("", "Oui", "Non", ),
62      $tab_actions['content'] =NULL;          1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ),
63      $selection=" where dossier.travaux ='".$idx."'";      );
64        /*Champs pour la recherche avancée*/
65        $champs['dossier'] = array(
66            'table' => 'dossier',
67            'colonne' => 'dossier',
68            'type' => 'text',
69            'taille' => 30,
70            'libelle' => _('dossier'));
71        //
72        $champs['dossier_autorisation_type_detaille'] = array(
73            'table' => 'dossier_autorisation_type_detaille',
74            'colonne' => 'dossier_autorisation_type_detaille',
75            'type' => 'select',
76            'taille' => 30,
77            'libelle' => _('dossier_autorisation_type_detaille'));
78    
79        //
80        $champs['parcelle'] = array(
81            'table' => 'dossier',
82            'colonne' => 'terrain_references_cadastrales',
83            'type' => 'text',
84            'taille' => 30,
85            'libelle' => _('parcelle'));
86        //// COL2
87    
88        //
89        $champs['etat'] = array(
90            'table' => 'dossier',
91            'colonne' => 'etat',
92            'type' => 'select',
93            'libelle' => _('etat'));
94        //
95        $champs['accord_tacite'] = array(
96            'table' => 'dossier',
97            'colonne' => 'accord_tacite',
98            'type' => 'select',
99            "subtype" => "manualselect",
100            'libelle' => _('accord_tacite'),
101            "args" => $args,
102        );
103    
104        //// COL3
105    
106    
107    
108    
109        //
110        $champs['instructeur'] = array(
111            'table' => 'dossier',
112            'colonne' => 'instructeur',
113            'type' => 'select',
114            'libelle' => _('instructeur'));
115        //
116        //$champs['architecte'] = array(
117        //    'table' => 'dossier',
118        //    'colonne' => 'architecte',
119        //    'type' => 'select',
120        //    'libelle' => _('architecte'));
121    
122        //
123        $champs['date_depot'] = array(
124            'colonne' => 'date_depot',
125            'table' => 'dossier',
126            'libelle' => _('date_depot'),
127            'lib1'=> _("debut"),
128            'lib2' => _("fin"),
129            'type' => 'date',
130            'taille' => 8,
131            'where' => 'intervaldate');
132        //
133        $champs['date_rejet'] = array(
134            'colonne' => 'date_rejet',
135            'table' => 'dossier',
136            'libelle' => _('date_rejet'),
137            'lib1'=> _("debut"),
138            'lib2' => _("fin"),
139            'type' => 'date',
140            'taille' => 8,
141            'where' => 'intervaldate');
142    
143       //
144        $champs['date_validite'] = array(
145            'colonne' => 'date_validite',
146            'table' => 'dossier',
147            'libelle' => _('date_validite'),
148            'lib1'=> _("debut"),
149            'lib2' => _("fin"),
150            'type' => 'date',
151            'taille' => 8,
152            'where' => 'intervaldate');
153    
154    
155    
156        //
157        $champs['date_complet'] = array(
158            'colonne' => 'date_complet',
159            'table' => 'dossier',
160            'libelle' => _('date_complet'),
161            'lib1'=> _("debut"),
162            'lib2' => _("fin"),
163            'type' => 'date',
164            'taille' => 8,
165            'where' => 'intervaldate');
166        //
167        $champs['date_decision'] = array(
168            'colonne' => 'date_decision',
169            'table' => 'dossier',
170            'libelle' => _('date_decision'),
171            'lib1'=> _("debut"),
172            'lib2' => _("fin"),
173            'type' => 'date',
174            'taille' => 8,
175            'where' => 'intervaldate');
176        //
177        $champs['date_limite'] = array(
178            'colonne' => 'date_limite',
179            'table' => 'dossier',
180            'libelle' => _('date_limite'),
181            'lib1'=> _("debut"),
182            'lib2' => _("fin"),
183            'type' => 'date',
184            'taille' => 8,
185            'where' => 'intervaldate');
186    
187    
188    
189    
190        //
191        $champs['date_chantier'] = array(
192            'colonne' => 'date_chantier',
193            'table' => 'dossier',
194            'libelle' => _('date_chantier'),
195            'lib1'=> _("debut"),
196            'lib2' => _("fin"),
197            'type' => 'date',
198            'taille' => 8,
199            'where' => 'intervaldate');
200        //
201        $champs['date_achevement'] = array(
202            'colonne' => 'date_achevement',
203            'table' => 'dossier',
204            'libelle' => _('date_achevement'),
205            'lib1'=> _("debut"),
206            'lib2' => _("fin"),
207            'type' => 'date',
208            'taille' => 8,
209            'where' => 'intervaldate');
210        //
211        $champs['date_conformite'] = array(
212            'colonne' => 'date_conformite',
213            'table' => 'dossier',
214            'libelle' => _('date_conformite'),
215            'lib1'=> _("debut"),
216            'lib2' => _("fin"),
217            'type' => 'date',
218            'taille' => 8,
219            'where' => 'intervaldate');
220        /*Configuration de la recherche avancée*/
221        $options[] = array(
222            'type' => 'search',
223            'display' => true,
224            'advanced'  => $champs,
225            'default_form'  => 'advanced',
226            'absolute_object' => 'dossier');
227  }  }
 $sousformulaire=array("instruction",  
                       "consultation",  
                       "terrain",  
                       "blocnote",  
                       "destination_shon",  
                       "statistique");  
 ?>  
228    
229    /*Ajout de sous-formulaire à notre objet*/
230    $sousformulaire=array(
231        //"donnees_techniques",
232        "document_numerise",
233        "instruction",
234        "consultation",
235        "lot",
236        "dossier_message",
237        "dossier_commission",
238        //"rapport_instruction",
239        "blocnote",
240        "dossier_autorisation",
241    );
242    
243    /*Ajout de paramètre à certains sous-formulaire*/
244    $sousformulaire_parameters = array(
245        "consultation" => array(
246            "title" => _("consultation(s)"),
247        ),
248        "dossier_message" => array(
249            "title" => _("message(s)"),
250        ),
251        "dossier_commission" => array(
252            "title" => _("commission(s)"),
253        ),
254        "rapport_instruction" => array(
255            "title" => _("rapport d'instruction"),
256            "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&",
257        ),
258        "lot" => array(
259            "title" => _("lot(s)"),
260        ),
261        "donnees_techniques" => array(
262            "title" => _("donnees techniques"),
263            "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&",
264        ),
265        "dossier_autorisation" => array(
266            "title" => _("DA"),
267            "href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&",
268        ),
269        "document_numerise" => array(
270            "title" => _("Piece(s)"),
271            "href" => "../app/document_numerise.view.php",
272        ),
273    );
274    ?>

Legend:
Removed from v.471  
changed lines
  Added in v.1988

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26