/[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 3381 - (hide annotations)
Fri Apr 3 08:36:11 2015 UTC (9 years, 10 months ago) by softime
File size: 9613 byte(s)
* Amélioration - Ajout de la gestion des nouvelles actions pour la classe dossier (et ses surcharges), donnees_technique, rapport_instruction.
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 nhaye 1400 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 fmichon 686 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 fmichon 681 LEFT JOIN ".DB_PREFIXE."division
20 fmichon 686 ON dossier.division=division.division";
21 fmichon 681
22 vpihour 1058 /*Champs du début de la requête*/
23 nhaye 471 $champAffiche=array(
24     'dossier.dossier as "'._("dossier").'"',
25 nhaye 1400 'TRIM(CONCAT(personne_morale_denomination,\' \',personne_morale_nom,\' \',demandeur.particulier_nom)) as "'._("petitionaire").'"',
26 nhaye 602 'instructeur.nom as "'._("instructeur").'"',
27 nhaye 471 'to_char(dossier.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"',
28 nhaye 1571 'dossier.date_dernier_depot as "'._("date_dernier_depot").'"',
29 nhaye 471 '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 vpihour 489 'avis_decision.libelle as "'._("avis_decision").'"',
34 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 ||
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 nhaye 625 as "'._("enjeu").'"',
37 nhaye 471 );
38 nhaye 467
39 vpihour 1058 /*Tri*/
40 vpihour 2284 $triOrder= "order by dossier.dossier";
41     $tri = $triOrder;
42 nhaye 467
43 vpihour 1058 /*Recherche simple*/
44 fmichon 1081 $champRecherche=array( 'dossier.dossier as "'._("dossier").'"',
45 nhaye 1400 'personne_morale_denomination as "'._("personne_morale_denomination").'"',
46     'particulier_nom as "'._("particulier_nom").'"',
47     );
48 nhaye 467
49 vpihour 1058 /*Icone*/
50 nhaye 467 $ico = "../img/ico_dossier.png";
51    
52     $edition="";
53    
54 vpihour 1058 /*Si l'on se trouve dans le formulaire dossier_instruction*/
55 fmichon 647 if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") {
56 fmichon 476 // Configuration de la recherche avancee
57     if (!isset($options)) {
58     $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 vpihour 1058 /*Champs pour la recherche avancée*/
66 fmichon 476 $champs['dossier'] = array(
67     'table' => 'dossier',
68 nhaye 3337 'colonne' => array('dossier', 'dossier_libelle'),
69 fmichon 476 'type' => 'text',
70     'taille' => 30,
71     'libelle' => _('dossier'));
72     //
73 nhaye 1138 $champs['dossier_autorisation_type_detaille'] = array(
74     'table' => 'dossier_autorisation_type_detaille',
75     'colonne' => 'dossier_autorisation_type_detaille',
76 fmichon 476 'type' => 'select',
77     'taille' => 30,
78 nhaye 1138 'libelle' => _('dossier_autorisation_type_detaille'));
79 nhaye 2243
80     $champs['particulier'] = array(
81     'table' => 'demandeur',
82 nhaye 3337 'colonne' => array('particulier_nom','particulier_prenom', 'personne_morale_denomination','personne_morale_raison_sociale'),
83 nhaye 2242 'type' => 'text',
84     'taille' => 30,
85 nhaye 3337 'libelle' => _('Demandeur'));
86 fmichon 476 //
87     $champs['parcelle'] = array(
88 softime 2267 'table' => 'dossier_parcelle',
89 atreal 2737 '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 softime 2267 'colonne' => 'libelle',
92 fmichon 476 'type' => 'text',
93     'taille' => 30,
94     'libelle' => _('parcelle'));
95     //// COL2
96    
97 nhaye 2242
98 fmichon 476 //
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 atreal 2737
231 vpihour 1058 /*Configuration de la recherche avancée*/
232 fmichon 476 $options[] = array(
233     'type' => 'search',
234     'display' => true,
235     'advanced' => $champs,
236     'default_form' => 'advanced',
237     'absolute_object' => 'dossier');
238 atreal 2737
239     /* désactivation du sélecteur de pages */
240 atreal 2722 $options[] = array(
241     'type' => 'pagination_select',
242     'display' => '');
243 fmichon 476 }
244    
245 vpihour 1058 /*Ajout de sous-formulaire à notre objet*/
246 fmichon 1485 $sousformulaire=array(
247     "instruction",
248     "consultation",
249 nmeucci 2979 "dossier_commission",
250 fmichon 1485 "lot",
251     "dossier_message",
252 fmichon 1761 "blocnote",
253 nmeucci 2979 "document_numerise",
254 fmichon 1485 "dossier_autorisation",
255     );
256 fmichon 872
257 softime 2751 $retourformulaire = (isset($_GET['retourformulaire']) ? $_GET['retourformulaire'] : "");
258    
259 vpihour 1058 /*Ajout de paramètre à certains sous-formulaire*/
260 fmichon 872 $sousformulaire_parameters = array(
261     "consultation" => array(
262     "title" => _("consultation(s)"),
263     ),
264     "dossier_message" => array(
265     "title" => _("message(s)"),
266     ),
267 fmichon 1087 "dossier_commission" => array(
268     "title" => _("commission(s)"),
269     ),
270 vpihour 1233 "lot" => array(
271     "title" => _("lot(s)"),
272     ),
273 nhaye 1279 "dossier_autorisation" => array(
274 fmichon 1485 "title" => _("DA"),
275 softime 2751 "href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"").
276     "&retourformulaire=".$retourformulaire."&",
277 nhaye 1279 ),
278 softime 1875 "document_numerise" => array(
279 softime 1889 "title" => _("Piece(s)"),
280     "href" => "../app/document_numerise.view.php",
281 softime 1875 ),
282 fmichon 872 );
283 softime 2724
284     // Si le paramètre 'option_sig' n'est pas désactivé
285     if ($f->getParameter('option_sig') != 'aucun') {
286     // On redéclare les sousformulaire
287     $sousformulaire=array(
288     "dossier_contrainte",
289     "instruction",
290     "consultation",
291 nmeucci 2979 "dossier_commission",
292 softime 2724 "lot",
293     "dossier_message",
294     "blocnote",
295 nmeucci 2979 "document_numerise",
296 softime 2724 "dossier_autorisation",
297     );
298     // On modifie le lien du paramètre dossier_contrainte
299     $sousformulaire_parameters["dossier_contrainte"] = array(
300 nmeucci 3378 "title" => _("Contrainte(s)"),
301     "href" => "../scr/form.php?obj=dossier&action=4&idx=".((isset($idx))?$idx:"")."&retourformulaire=".((isset($_GET['obj']))?$_GET['obj']:"")."&",
302 softime 2724 );
303     }
304    
305 fmichon 476 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26