1 |
<?php |
2 |
/** |
3 |
* @package openfoncier |
4 |
* @version SVN : $id$ |
5 |
**/ |
6 |
|
7 |
// |
8 |
include('../sql/pgsql/dossier_instruction.inc.php'); |
9 |
|
10 |
$table = DB_PREFIXE."dossier |
11 |
INNER JOIN ".DB_PREFIXE."lien_dossier_demandeur |
12 |
ON lien_dossier_demandeur.dossier=dossier.dossier |
13 |
AND lien_dossier_demandeur.petitionnaire_principal IS TRUE |
14 |
INNER JOIN ".DB_PREFIXE."demandeur |
15 |
ON lien_dossier_demandeur.demandeur=demandeur.demandeur |
16 |
INNER JOIN ".DB_PREFIXE."dossier_autorisation |
17 |
ON dossier_autorisation.dossier_autorisation = dossier.dossier_autorisation |
18 |
LEFT JOIN ".DB_PREFIXE."instructeur |
19 |
ON dossier.instructeur = instructeur.instructeur |
20 |
LEFT JOIN ".DB_PREFIXE."om_utilisateur |
21 |
ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur |
22 |
LEFT JOIN ".DB_PREFIXE."avis_decision |
23 |
ON avis_decision.avis_decision=dossier.avis_decision |
24 |
LEFT JOIN ".DB_PREFIXE."division |
25 |
ON dossier.division=division.division"; |
26 |
|
27 |
// Recherche avancee |
28 |
$champs = array(); |
29 |
|
30 |
$champs['dossier'] = array( |
31 |
'table' => 'dossier', |
32 |
'colonne' => 'dossier', |
33 |
'type' => 'text', |
34 |
'libelle' => _('dossier_instruction')); |
35 |
|
36 |
$champs['particulier_nom'] = |
37 |
array('colonne' => 'particulier_nom', |
38 |
'table' => 'demandeur', |
39 |
'libelle' => _('petitionnaire'), |
40 |
'type' => 'text' |
41 |
); |
42 |
$champs['adresse'] = array( |
43 |
'table' => 'dossier', |
44 |
'colonne' => 'TRIM(CONCAT(dossier_autorisation.terrain_adresse_voie_numero,\' \', |
45 |
dossier_autorisation.complement,\' \', |
46 |
dossier_autorisation.terrain_adresse_lieu_dit,\' \', |
47 |
dossier_autorisation.terrain_adresse_code_postal,\' \', |
48 |
dossier_autorisation.terrain_adresse_localite,\' \', |
49 |
dossier_autorisation.terrain_adresse_bp,\' \', |
50 |
dossier_autorisation.terrain_adresse_cedex |
51 |
))', |
52 |
'type' => 'text', |
53 |
'libelle' => _('terrain')); |
54 |
|
55 |
$champs['arrondissement'] = |
56 |
array('colonne' => 'arrondissement', |
57 |
'table' => 'dossier_autorisation', |
58 |
'libelle' => _('arrondissement'), |
59 |
'type' => 'select' |
60 |
); |
61 |
|
62 |
$champs['dossier_autorisation_type_detaille'] = array( |
63 |
'table' => 'dossier_autorisation', |
64 |
'colonne' => 'dossier_autorisation_type_detaille', |
65 |
'type' => 'select', |
66 |
'libelle' => _('nature du dossier')); |
67 |
|
68 |
$champs['depot_initial'] = |
69 |
array('colonne' => 'depot_initial', |
70 |
'table' => 'dossier', |
71 |
'libelle' => _('depot_initial'), |
72 |
'type' => 'date', |
73 |
'where' => 'intervaldate'); |
74 |
|
75 |
$champs['etat'] = array( |
76 |
'table' => 'dossier', |
77 |
'colonne' => 'etat', |
78 |
'type' => 'select', |
79 |
'libelle' => _('etat du dossier')); |
80 |
|
81 |
$options[] = array('type' => 'search', |
82 |
'display' => true, |
83 |
'advanced' => $champs, |
84 |
'absolute_object' => 'dossier', |
85 |
'export' => array("csv")); |
86 |
|
87 |
?> |