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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1034 - (show annotations)
Mon Dec 10 16:56:38 2012 UTC (12 years, 1 month ago) by vpihour
File size: 3602 byte(s)
Ajout des tableaux dans les paramètres de la recherche avancée

1 <?php
2 //$Id$
3 //gen openMairie le 08/11/2012 14:00
4
5 include('../gen/sql/pgsql/demande.inc.php');
6
7 //TABLE
8 $table = DB_PREFIXE."demande
9 INNER JOIN ".DB_PREFIXE."lien_demande_demandeur
10 ON lien_demande_demandeur.demande=demande.demande
11 AND lien_demande_demandeur.petitionnaire_principal IS TRUE
12 INNER JOIN ".DB_PREFIXE."demandeur
13 ON lien_demande_demandeur.demandeur=demandeur.demandeur
14 LEFT JOIN ".DB_PREFIXE."arrondissement
15 ON demande.arrondissement=arrondissement.arrondissement
16 LEFT JOIN ".DB_PREFIXE."demande_type
17 ON demande.demande_type=demande_type.demande_type
18 LEFT JOIN ".DB_PREFIXE."dossier_autorisation
19 ON demande.dossier_autorisation=dossier_autorisation.dossier_autorisation
20 LEFT JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille
21 ON demande.dossier_autorisation_type_detaille=dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
22 LEFT JOIN ".DB_PREFIXE."dossier
23 ON demande.dossier_instruction=dossier.dossier
24 LEFT JOIN ".DB_PREFIXE."instruction
25 ON demande.instruction_recepisse=instruction.instruction ";
26
27 // SELECT
28 $champAffiche = array(
29 'demande.demande as "'._("demande").'"',
30 'COALESCE(demandeur.particulier_nom, demandeur.personne_morale_denomination) as "'._("petitionaire principal").'"',
31 'TRIM(CONCAT(demande.terrain_adresse_voie_numero,\' \',
32 demande.complement,\' \',
33 demande.terrain_adresse_lieu_dit,\' \',
34 demande.terrain_adresse_code_postal,\' \',
35 demande.terrain_adresse_localite,\' \',
36 demande.terrain_adresse_bp,\' \',
37 demande.terrain_adresse_cedex
38 )) as "'._("adresse du terrain").'"',
39 'dossier_autorisation_type_detaille.libelle as "'._("dossier_autorisation_type_detaille").'"',
40 'to_char(demande.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"',
41 'arrondissement.libelle as "'._("arrondissement").'"',
42 );
43
44 // Recherche avancee
45 $champs = array();
46
47 $champs['dossier_instruction'] = array(
48 'table' => 'dossier',
49 'colonne' => 'dossier',
50 'type' => 'text',
51 'libelle' => _('dossier_instruction'));
52
53
54 $champs['particulier_nom'] =
55 array('colonne' => array('particulier_nom', 'personne_morale_denomination'),
56 'table' => 'demandeur',
57 'libelle' => _('petitionnaire'),
58 'type' => 'text'
59 );
60
61 $champs['adresse'] = array(
62 'table' => 'demande',
63 'colonne' => array('terrain_adresse_voie_numero','complement',
64 'terrain_adresse_lieu_dit', 'terrain_adresse_code_postal',
65 'terrain_adresse_localite', 'terrain_adresse_bp',
66 'terrain_adresse_cedex'),
67 'type' => 'text',
68 'libelle' => _('terrain'));
69
70 $champs['arrondissement'] =
71 array('colonne' => 'arrondissement',
72 'table' => 'demande',
73 'libelle' => _('arrondissement'),
74 'type' => 'select'
75 );
76
77 $champs['dossier_autorisation_type_detaille'] = array(
78 'table' => 'demande',
79 'colonne' => 'dossier_autorisation_type_detaille',
80 'type' => 'select',
81 'libelle' => _('nature du dossier'));
82
83 $champs['date_demande'] =
84 array('colonne' => 'date_demande',
85 'table' => 'demande',
86 'libelle' => _('date_demande'),
87 'type' => 'date',
88 'where' => 'intervaldate');
89
90 $options[] = array('type' => 'search',
91 'display' => true,
92 'advanced' => $champs,
93 'absolute_object' => 'demande',
94 'export' => array("csv"));
95
96 $sousformulaire = NULL;
97 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26