/[openfoncier]/trunk/sql/pgsql/dossier.inc.php
ViewVC logotype

Contents of /trunk/sql/pgsql/dossier.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2242 - (show annotations)
Wed Sep 4 14:40:03 2013 UTC (11 years, 5 months ago) by nhaye
File size: 9182 byte(s)
Remise des champs de recherche sur les nom de délégataire de demandeur et de société dans le tableau de recherche des dossiers

1 <?php
2 //$Id$
3 //gen openMairie le 10/02/2011 20:39
4 include('../gen/sql/pgsql/dossier.inc.php');
5
6 /*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 /*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 $tri= "order by dossier.dossier";
41
42 /*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";
50
51 $edition="";
52
53 /*Si l'on se trouve dans le formulaire dossier_instruction*/
54 if (isset($_GET["obj"]) && $_GET["obj"] == "dossier_instruction") {
55 // Configuration de la recherche avancee
56 if (!isset($options)) {
57 $options = array();
58 }
59 // Options pour les select de faux booléens
60 $args = array(
61 0 => array("", "Oui", "Non", ),
62 1 => array(_("choisir")." "._("accord_tacite"), _("Oui"), _("Non"), ),
63 );
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 $champs['delegataire_nom'] = array(
80 'table' => 'dossier',
81 'colonne' => 'delegataire_nom',
82 'type' => 'text',
83 'taille' => 30,
84 'libelle' => _('nom delegataire'));
85 //
86 $champs['demandeur_nom'] = array(
87 'table' => 'dossier',
88 'colonne' => 'demandeur_nom',
89 'type' => 'text',
90 'taille' => 30,
91 'libelle' => _('nom demandeur'));
92 //
93 $champs['demandeur_societe'] = array(
94 'table' => 'dossier',
95 'colonne' => 'demandeur_societe',
96 'type' => 'text',
97 'taille' => 30,
98 'libelle' => _('demandeur_societe'));
99 //
100 $champs['parcelle'] = array(
101 'table' => 'dossier',
102 'colonne' => 'terrain_references_cadastrales',
103 'type' => 'text',
104 'taille' => 30,
105 'libelle' => _('parcelle'));
106 //// COL2
107
108
109 //
110 $champs['etat'] = array(
111 'table' => 'dossier',
112 'colonne' => 'etat',
113 'type' => 'select',
114 'libelle' => _('etat'));
115 //
116 $champs['accord_tacite'] = array(
117 'table' => 'dossier',
118 'colonne' => 'accord_tacite',
119 'type' => 'select',
120 "subtype" => "manualselect",
121 'libelle' => _('accord_tacite'),
122 "args" => $args,
123 );
124
125 //// COL3
126
127
128
129
130 //
131 $champs['instructeur'] = array(
132 'table' => 'dossier',
133 'colonne' => 'instructeur',
134 'type' => 'select',
135 'libelle' => _('instructeur'));
136 //
137 //$champs['architecte'] = array(
138 // 'table' => 'dossier',
139 // 'colonne' => 'architecte',
140 // 'type' => 'select',
141 // 'libelle' => _('architecte'));
142
143 //
144 $champs['date_depot'] = array(
145 'colonne' => 'date_depot',
146 'table' => 'dossier',
147 'libelle' => _('date_depot'),
148 'lib1'=> _("debut"),
149 'lib2' => _("fin"),
150 'type' => 'date',
151 'taille' => 8,
152 'where' => 'intervaldate');
153 //
154 $champs['date_rejet'] = array(
155 'colonne' => 'date_rejet',
156 'table' => 'dossier',
157 'libelle' => _('date_rejet'),
158 'lib1'=> _("debut"),
159 'lib2' => _("fin"),
160 'type' => 'date',
161 'taille' => 8,
162 'where' => 'intervaldate');
163
164 //
165 $champs['date_validite'] = array(
166 'colonne' => 'date_validite',
167 'table' => 'dossier',
168 'libelle' => _('date_validite'),
169 'lib1'=> _("debut"),
170 'lib2' => _("fin"),
171 'type' => 'date',
172 'taille' => 8,
173 'where' => 'intervaldate');
174
175
176
177 //
178 $champs['date_complet'] = array(
179 'colonne' => 'date_complet',
180 'table' => 'dossier',
181 'libelle' => _('date_complet'),
182 'lib1'=> _("debut"),
183 'lib2' => _("fin"),
184 'type' => 'date',
185 'taille' => 8,
186 'where' => 'intervaldate');
187 //
188 $champs['date_decision'] = array(
189 'colonne' => 'date_decision',
190 'table' => 'dossier',
191 'libelle' => _('date_decision'),
192 'lib1'=> _("debut"),
193 'lib2' => _("fin"),
194 'type' => 'date',
195 'taille' => 8,
196 'where' => 'intervaldate');
197 //
198 $champs['date_limite'] = array(
199 'colonne' => 'date_limite',
200 'table' => 'dossier',
201 'libelle' => _('date_limite'),
202 'lib1'=> _("debut"),
203 'lib2' => _("fin"),
204 'type' => 'date',
205 'taille' => 8,
206 'where' => 'intervaldate');
207
208
209
210
211 //
212 $champs['date_chantier'] = array(
213 'colonne' => 'date_chantier',
214 'table' => 'dossier',
215 'libelle' => _('date_chantier'),
216 'lib1'=> _("debut"),
217 'lib2' => _("fin"),
218 'type' => 'date',
219 'taille' => 8,
220 'where' => 'intervaldate');
221 //
222 $champs['date_achevement'] = array(
223 'colonne' => 'date_achevement',
224 'table' => 'dossier',
225 'libelle' => _('date_achevement'),
226 'lib1'=> _("debut"),
227 'lib2' => _("fin"),
228 'type' => 'date',
229 'taille' => 8,
230 'where' => 'intervaldate');
231 //
232 $champs['date_conformite'] = array(
233 'colonne' => 'date_conformite',
234 'table' => 'dossier',
235 'libelle' => _('date_conformite'),
236 'lib1'=> _("debut"),
237 'lib2' => _("fin"),
238 'type' => 'date',
239 'taille' => 8,
240 'where' => 'intervaldate');
241 /*Configuration de la recherche avancée*/
242 $options[] = array(
243 'type' => 'search',
244 'display' => true,
245 'advanced' => $champs,
246 'default_form' => 'advanced',
247 'absolute_object' => 'dossier');
248 }
249
250 /*Ajout de sous-formulaire à notre objet*/
251 $sousformulaire=array(
252 //"donnees_techniques",
253 "document_numerise",
254 "instruction",
255 "consultation",
256 "lot",
257 "dossier_message",
258 "dossier_commission",
259 //"rapport_instruction",
260 "blocnote",
261 "dossier_autorisation",
262 );
263
264 /*Ajout de paramètre à certains sous-formulaire*/
265 $sousformulaire_parameters = array(
266 "consultation" => array(
267 "title" => _("consultation(s)"),
268 ),
269 "dossier_message" => array(
270 "title" => _("message(s)"),
271 ),
272 "dossier_commission" => array(
273 "title" => _("commission(s)"),
274 ),
275 "rapport_instruction" => array(
276 "title" => _("rapport d'instruction"),
277 "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=rapport_instruction&",
278 ),
279 "lot" => array(
280 "title" => _("lot(s)"),
281 ),
282 "donnees_techniques" => array(
283 "title" => _("donnees techniques"),
284 "href" => "../app/redirection_onglet.php?idx=".((isset($idx))? $idx:"")."&obj=donnees_techniques&",
285 ),
286 "dossier_autorisation" => array(
287 "title" => _("DA"),
288 "href" => "../app/display_da_di.php?iddi=".((isset($idx))? $idx:"")."&",
289 ),
290 "document_numerise" => array(
291 "title" => _("Piece(s)"),
292 "href" => "../app/document_numerise.view.php",
293 ),
294 );
295 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26