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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1056 - (hide annotations)
Thu Dec 13 10:28:14 2012 UTC (12 years, 1 month ago) by vpihour
File size: 3869 byte(s)
Modification des noms des champs affichés

1 vpihour 632 <?php
2     //$Id$
3     //gen openMairie le 08/11/2012 14:00
4    
5     include('../gen/sql/pgsql/demande.inc.php');
6 fmichon 1005
7 vpihour 1034 //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 vpihour 1038 $case_demandeur = "CASE WHEN demandeur.qualite='particulier'
28     THEN TRIM(CONCAT(demandeur.particulier_nom, ' ', demandeur.particulier_prenom))
29     ELSE TRIM(CONCAT(demandeur.personne_morale_raison_sociale, ' ', demandeur.personne_morale_denomination))
30     END";
31    
32 vpihour 1049 /*Supression du bouton d'ajout de nouvelle demande à partir du formulaire*/
33     $tab_actions['corner']['ajouter'] = NULL;
34    
35 vpihour 1034 // SELECT
36     $champAffiche = array(
37 vpihour 1056 'demande.dossier_instruction as "'._("dossier").'"',
38     $case_demandeur.' as "'._("nom").'"',
39 vpihour 1034 'TRIM(CONCAT(demande.terrain_adresse_voie_numero,\' \',
40     demande.complement,\' \',
41     demande.terrain_adresse_lieu_dit,\' \',
42     demande.terrain_adresse_code_postal,\' \',
43     demande.terrain_adresse_localite,\' \',
44     demande.terrain_adresse_bp,\' \',
45     demande.terrain_adresse_cedex
46 vpihour 1056 )) as "'._("terrain").'"',
47     'dossier_autorisation_type_detaille.libelle as "'._("nature_dossier").'"',
48 vpihour 1034 'to_char(demande.date_demande ,\'DD/MM/YYYY\') as "'._("date_demande").'"',
49     'arrondissement.libelle as "'._("arrondissement").'"',
50     );
51    
52 fmichon 1005 // Recherche avancee
53     $champs = array();
54    
55     $champs['dossier_instruction'] = array(
56     'table' => 'dossier',
57     'colonne' => 'dossier',
58     'type' => 'text',
59 vpihour 1056 'libelle' => _('dossier'));
60 fmichon 1005
61    
62     $champs['particulier_nom'] =
63 vpihour 1034 array('colonne' => array('particulier_nom', 'personne_morale_denomination'),
64 fmichon 1005 'table' => 'demandeur',
65     'libelle' => _('petitionnaire'),
66     'type' => 'text'
67     );
68    
69     $champs['adresse'] = array(
70 vpihour 1034 'table' => 'demande',
71     'colonne' => array('terrain_adresse_voie_numero','complement',
72     'terrain_adresse_lieu_dit', 'terrain_adresse_code_postal',
73     'terrain_adresse_localite', 'terrain_adresse_bp',
74     'terrain_adresse_cedex'),
75 fmichon 1005 'type' => 'text',
76 vpihour 1038 'libelle' => _('adresse'));
77 fmichon 1005
78     $champs['arrondissement'] =
79     array('colonne' => 'arrondissement',
80     'table' => 'demande',
81     'libelle' => _('arrondissement'),
82     'type' => 'select'
83     );
84    
85     $champs['dossier_autorisation_type_detaille'] = array(
86     'table' => 'demande',
87     'colonne' => 'dossier_autorisation_type_detaille',
88     'type' => 'select',
89     'libelle' => _('nature du dossier'));
90    
91     $champs['date_demande'] =
92     array('colonne' => 'date_demande',
93     'table' => 'demande',
94     'libelle' => _('date_demande'),
95     'type' => 'date',
96     'where' => 'intervaldate');
97    
98     $options[] = array('type' => 'search',
99     'display' => true,
100     'advanced' => $champs,
101 vpihour 1034 'absolute_object' => 'demande',
102 fmichon 1005 'export' => array("csv"));
103    
104     $sousformulaire = NULL;
105 vpihour 632 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26