/[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 2284 - (hide annotations)
Thu Sep 12 12:33:09 2013 UTC (11 years, 4 months ago) by vpihour
File size: 8847 byte(s)
Correction d'une erreur de base de données

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     'colonne' => 'dossier',
69     '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 2245 'colonne' => array('particulier_nom','particulier_prenom','particulier_nom','personne_morale_nom','personne_morale_prenom','personne_morale_denomination'),
83 nhaye 2242 'type' => 'text',
84     'taille' => 30,
85 nhaye 2245 'libelle' => _('Demandeur'));
86 fmichon 476 //
87     $champs['parcelle'] = array(
88 softime 2267 'table' => 'dossier_parcelle',
89     'colonne' => 'libelle',
90 fmichon 476 'type' => 'text',
91     'taille' => 30,
92     'libelle' => _('parcelle'));
93     //// COL2
94    
95 nhaye 2242
96 fmichon 476 //
97     $champs['etat'] = array(
98     'table' => 'dossier',
99     'colonne' => 'etat',
100     'type' => 'select',
101     'libelle' => _('etat'));
102     //
103     $champs['accord_tacite'] = array(
104     'table' => 'dossier',
105     'colonne' => 'accord_tacite',
106     'type' => 'select',
107     "subtype" => "manualselect",
108     'libelle' => _('accord_tacite'),
109     "args" => $args,
110     );
111    
112     //// COL3
113    
114    
115    
116    
117     //
118     $champs['instructeur'] = array(
119     'table' => 'dossier',
120     'colonne' => 'instructeur',
121     'type' => 'select',
122     'libelle' => _('instructeur'));
123     //
124     //$champs['architecte'] = array(
125     // 'table' => 'dossier',
126     // 'colonne' => 'architecte',
127     // 'type' => 'select',
128     // 'libelle' => _('architecte'));
129    
130     //
131     $champs['date_depot'] = array(
132     'colonne' => 'date_depot',
133     'table' => 'dossier',
134     'libelle' => _('date_depot'),
135     'lib1'=> _("debut"),
136     'lib2' => _("fin"),
137     'type' => 'date',
138     'taille' => 8,
139     'where' => 'intervaldate');
140     //
141     $champs['date_rejet'] = array(
142     'colonne' => 'date_rejet',
143     'table' => 'dossier',
144     'libelle' => _('date_rejet'),
145     'lib1'=> _("debut"),
146     'lib2' => _("fin"),
147     'type' => 'date',
148     'taille' => 8,
149     'where' => 'intervaldate');
150    
151     //
152     $champs['date_validite'] = array(
153     'colonne' => 'date_validite',
154     'table' => 'dossier',
155     'libelle' => _('date_validite'),
156     'lib1'=> _("debut"),
157     'lib2' => _("fin"),
158     'type' => 'date',
159     'taille' => 8,
160     'where' => 'intervaldate');
161    
162    
163    
164     //
165     $champs['date_complet'] = array(
166     'colonne' => 'date_complet',
167     'table' => 'dossier',
168     'libelle' => _('date_complet'),
169     'lib1'=> _("debut"),
170     'lib2' => _("fin"),
171     'type' => 'date',
172     'taille' => 8,
173     'where' => 'intervaldate');
174     //
175     $champs['date_decision'] = array(
176     'colonne' => 'date_decision',
177     'table' => 'dossier',
178     'libelle' => _('date_decision'),
179     'lib1'=> _("debut"),
180     'lib2' => _("fin"),
181     'type' => 'date',
182     'taille' => 8,
183     'where' => 'intervaldate');
184     //
185     $champs['date_limite'] = array(
186     'colonne' => 'date_limite',
187     'table' => 'dossier',
188     'libelle' => _('date_limite'),
189     'lib1'=> _("debut"),
190     'lib2' => _("fin"),
191     'type' => 'date',
192     'taille' => 8,
193     'where' => 'intervaldate');
194    
195    
196    
197    
198     //
199     $champs['date_chantier'] = array(
200     'colonne' => 'date_chantier',
201     'table' => 'dossier',
202     'libelle' => _('date_chantier'),
203     'lib1'=> _("debut"),
204     'lib2' => _("fin"),
205     'type' => 'date',
206     'taille' => 8,
207     'where' => 'intervaldate');
208     //
209     $champs['date_achevement'] = array(
210     'colonne' => 'date_achevement',
211     'table' => 'dossier',
212     'libelle' => _('date_achevement'),
213     'lib1'=> _("debut"),
214     'lib2' => _("fin"),
215     'type' => 'date',
216     'taille' => 8,
217     'where' => 'intervaldate');
218     //
219     $champs['date_conformite'] = array(
220     'colonne' => 'date_conformite',
221     'table' => 'dossier',
222     'libelle' => _('date_conformite'),
223     'lib1'=> _("debut"),
224     'lib2' => _("fin"),
225     'type' => 'date',
226     'taille' => 8,
227     'where' => 'intervaldate');
228 vpihour 1058 /*Configuration de la recherche avancée*/
229 fmichon 476 $options[] = array(
230     'type' => 'search',
231     'display' => true,
232     'advanced' => $champs,
233     'default_form' => 'advanced',
234     'absolute_object' => 'dossier');
235     }
236    
237 vpihour 1058 /*Ajout de sous-formulaire à notre objet*/
238 fmichon 1485 $sousformulaire=array(
239     //"donnees_techniques",
240 softime 1889 "document_numerise",
241 fmichon 1485 "instruction",
242     "consultation",
243     "lot",
244     "dossier_message",
245     "dossier_commission",
246     //"rapport_instruction",
247 fmichon 1761 "blocnote",
248 fmichon 1485 "dossier_autorisation",
249     );
250 fmichon 872
251 vpihour 1058 /*Ajout de paramètre à certains sous-formulaire*/
252 fmichon 872 $sousformulaire_parameters = array(
253     "consultation" => array(
254     "title" => _("consultation(s)"),
255     ),
256     "dossier_message" => array(
257     "title" => _("message(s)"),
258     ),
259 fmichon 1087 "dossier_commission" => array(
260     "title" => _("commission(s)"),
261     ),
262 vpihour 1218 "rapport_instruction" => array(
263     "title" => _("rapport d'instruction"),
264 vpihour 1265 "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&",
265 vpihour 1218 ),
266 vpihour 1233 "lot" => array(
267     "title" => _("lot(s)"),
268     ),
269 vpihour 1265 "donnees_techniques" => array(
270     "title" => _("donnees techniques"),
271     "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&",
272     ),
273 nhaye 1279 "dossier_autorisation" => array(
274 fmichon 1485 "title" => _("DA"),
275 nhaye 1279 "href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&",
276     ),
277 softime 1875 "document_numerise" => array(
278 softime 1889 "title" => _("Piece(s)"),
279     "href" => "../app/document_numerise.view.php",
280 softime 1875 ),
281 fmichon 872 );
282 fmichon 476 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26