1 |
nhaye |
544 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 18/10/2012 16:21 |
4 |
|
|
include('../gen/sql/pgsql/consultation.inc.php'); |
5 |
|
|
$ent = _("Demandes d'avis")." -> "._("en cours"); |
6 |
|
|
|
7 |
|
|
// FROM |
8 |
|
|
$table = DB_PREFIXE."consultation |
9 |
|
|
INNER JOIN ".DB_PREFIXE."dossier |
10 |
|
|
ON consultation.dossier=dossier.dossier |
11 |
|
|
INNER JOIN ".DB_PREFIXE."service |
12 |
|
|
ON service.service=consultation.service |
13 |
|
|
LEFT OUTER JOIN ".DB_PREFIXE."avis_consultation |
14 |
|
|
ON consultation.avis_consultation=avis_consultation.avis_consultation |
15 |
|
|
LEFT OUTER JOIN ".DB_PREFIXE."travaux |
16 |
|
|
ON travaux.travaux=dossier.travaux |
17 |
|
|
"; |
18 |
|
|
// XXX LEFT OUTER JOIN pieces_complementaire |
19 |
|
|
// SELECT |
20 |
|
|
$champAffiche = array( |
21 |
|
|
'consultation.consultation as "'._("consultation").'"', |
22 |
|
|
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
23 |
|
|
'consultation.dossier as "'._("dossier").'"', |
24 |
|
|
// date de depots de piece complementaire |
25 |
|
|
'travaux.libelle as "'._("Nature des travaux").'"', |
26 |
|
|
'dossier.terrain_numero||dossier.terrain_numero_complement||\' \'||dossier.terrain_adresse |
27 |
|
|
||\' \'||dossier.terrain_adresse_complement||\' \'||terrain_cp||\' \'||terrain_ville as "'._("Adresse du terrain").'"', |
28 |
|
|
'dossier.demandeur_nom as "'._("petitionaire").'"', |
29 |
|
|
'dossier.shon as "'._("surface").'"', |
30 |
|
|
'service.abrege as "'._("service").'"', |
31 |
|
|
); |
32 |
|
|
// |
33 |
|
|
$champRecherche = array( |
34 |
|
|
'consultation.consultation as "'._("consultation").'"', |
35 |
|
|
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
36 |
|
|
'consultation.dossier as "'._("dossier").'"', |
37 |
|
|
// date de depots de piece complementaire |
38 |
|
|
'traveaux.libelle as "'._("Nature des travaux").'"', |
39 |
|
|
'dossier.terrain_adresse as "'._("Adresse du terrain").'"', |
40 |
|
|
'dossier.terrain_cp as "'._("Adresse du terrain").'"', |
41 |
|
|
'dossier.terrain_ville as "'._("Adresse du terrain").'"', |
42 |
|
|
'dossier.demandeur_nom as "'._("petitionaire").'"', |
43 |
|
|
'dossier.shon as "'._("surface").'"', |
44 |
|
|
'service.abrege as "'._("service").'"', |
45 |
|
|
); |
46 |
|
|
$tri="ORDER BY consultation.date_limite::date ASC"; |
47 |
|
|
$edition=""; |
48 |
|
|
$selection=' WHERE consultation.date_limite>=current_date AND consultation.avis_consultation IS NULL'; |
49 |
|
|
//XXX Manque le filtre sur le service concerne |
50 |
|
|
|
51 |
|
|
//Suppression des liens |
52 |
|
|
$tab_actions['corner']['ajouter']=NULL; |
53 |
|
|
$tab_actions['left']['consulter']=NULL; |
54 |
|
|
|
55 |
|
|
//Recherche avancee |
56 |
|
|
|
57 |
|
|
$champs = array(); |
58 |
|
|
|
59 |
|
|
$champs['date_limite'] = |
60 |
|
|
array('colonne' => 'date_limite', |
61 |
|
|
'table' => 'consultation', |
62 |
|
|
'libelle' => _('Date limite'), |
63 |
|
|
'type' => 'date', |
64 |
|
|
'where' => 'intervaldate'); |
65 |
|
|
|
66 |
|
|
$champs['dossier'] = array( |
67 |
|
|
'table' => 'consultation', |
68 |
|
|
'colonne' => 'dossier', |
69 |
|
|
'type' => 'text', |
70 |
|
|
'libelle' => _('dossier')); |
71 |
|
|
|
72 |
|
|
$champs['nature'] = array( |
73 |
|
|
'table' => 'travaux', |
74 |
|
|
'colonne' => 'libelle', |
75 |
|
|
'type' => 'text', |
76 |
|
|
'libelle' => _('nature des travaux')); |
77 |
|
|
|
78 |
|
|
$champs['adresse'] = array( |
79 |
|
|
'table' => 'dossier', |
80 |
|
|
'colonne' => 'terrain_adresse', |
81 |
|
|
'type' => 'text', |
82 |
|
|
'libelle' => _('terrain')); |
83 |
|
|
|
84 |
|
|
$champs['petitionnaire'] = array( |
85 |
|
|
'table' => 'dossier', |
86 |
|
|
'colonne' => 'demandeur_nom', |
87 |
|
|
'type' => 'text', |
88 |
|
|
'libelle' => _('petitionnaire')); |
89 |
|
|
|
90 |
|
|
$champs['service_abrege'] = array( |
91 |
|
|
'table' => 'service', |
92 |
|
|
'colonne' => 'abrege', |
93 |
|
|
'type' => 'text', |
94 |
|
|
'libelle' => _('Service (abrege)')); |
95 |
|
|
|
96 |
|
|
$options[] = array('type' => 'search', |
97 |
|
|
'display' => true, |
98 |
|
|
'advanced' => $champs, |
99 |
|
|
'absolute_object' => 'consultation'); |
100 |
|
|
|
101 |
|
|
?> |