1 |
nhaye |
619 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 06/11/2012 10:59 |
4 |
|
|
|
5 |
|
|
$reqmo['libelle']=_('reqmo-libelle-consultation'); |
6 |
|
|
$reqmo['reqmo_libelle']=_('reqmo-libelle-consultation'); |
7 |
|
|
$ent=_('consultation'); |
8 |
|
|
$reqmo['sql']="select [consultation], [dossier], [date_envoi], [date_retour], [date_limite], [service], [avis_consultation], [date_reception], [motivation], [fichier], [lu] from ".DB_PREFIXE."consultation order by [tri]"; |
9 |
|
|
$reqmo['consultation']='checked'; |
10 |
|
|
$reqmo['dossier']='checked'; |
11 |
|
|
$reqmo['date_envoi']='checked'; |
12 |
|
|
$reqmo['date_retour']='checked'; |
13 |
|
|
$reqmo['date_limite']='checked'; |
14 |
|
|
$reqmo['service']='checked'; |
15 |
|
|
$reqmo['avis_consultation']='checked'; |
16 |
|
|
$reqmo['date_reception']='checked'; |
17 |
|
|
$reqmo['motivation']='checked'; |
18 |
|
|
$reqmo['fichier']='checked'; |
19 |
|
|
$reqmo['lu']='checked'; |
20 |
|
|
$reqmo['tri']=array('consultation','dossier','date_envoi','date_retour','date_limite','service','avis_consultation','date_reception','motivation','fichier','lu'); |
21 |
|
|
|
22 |
|
|
$table = DB_PREFIXE."consultation |
23 |
|
|
INNER JOIN ".DB_PREFIXE."dossier |
24 |
|
|
ON consultation.dossier=dossier.dossier |
25 |
|
|
INNER JOIN ".DB_PREFIXE."service |
26 |
|
|
ON service.service=consultation.service |
27 |
|
|
INNER JOIN lien_service_om_utilisateur |
28 |
|
|
ON lien_service_om_utilisateur.service=service.service |
29 |
|
|
INNER JOIN om_utilisateur |
30 |
|
|
ON om_utilisateur.om_utilisateur=lien_service_om_utilisateur.om_utilisateur |
31 |
|
|
LEFT OUTER JOIN ".DB_PREFIXE."avis_consultation |
32 |
|
|
ON consultation.avis_consultation=avis_consultation.avis_consultation |
33 |
|
|
LEFT OUTER JOIN ".DB_PREFIXE."travaux |
34 |
|
|
ON travaux.travaux=dossier.travaux |
35 |
|
|
LEFT OUTER JOIN ".DB_PREFIXE."instructeur |
36 |
|
|
ON instructeur.instructeur=dossier.instructeur |
37 |
|
|
"; |
38 |
|
|
// XXX LEFT OUTER JOIN pieces_complementaire |
39 |
|
|
// SELECT |
40 |
|
|
$champAffiche = array( |
41 |
|
|
'consultation.consultation as "'._("consultation").'"', |
42 |
|
|
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
43 |
|
|
'consultation.dossier as "'._("dossier").'"', |
44 |
|
|
'instructeur.nom', |
45 |
|
|
'travaux.libelle as "'._("Nature des travaux").'"', |
46 |
|
|
'dossier.terrain_numero||dossier.terrain_numero_complement||\' \'||dossier.terrain_adresse |
47 |
|
|
||\' \'||dossier.terrain_adresse_complement||\' \'||terrain_cp||\' \'||terrain_ville as "'._("Adresse du terrain").'"', |
48 |
|
|
'dossier.demandeur_nom as "'._("petitionaire").'"', |
49 |
|
|
'dossier.shon as "'._("surface").'"', |
50 |
|
|
'service.abrege as "'._("service").'"', |
51 |
|
|
); |
52 |
|
|
// |
53 |
|
|
|
54 |
|
|
$tri="ORDER BY consultation.date_limite::date ASC"; |
55 |
|
|
?> |