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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1238 - (hide annotations)
Mon Feb 11 17:21:17 2013 UTC (11 years, 11 months ago) by vpihour
File size: 1059 byte(s)
Configuration du tableau de lot

1 vpihour 633 <?php
2     //$Id$
3     //gen openMairie le 08/11/2012 14:59
4    
5     include('../gen/sql/pgsql/lot.inc.php');
6 vpihour 1238
7     //Surcharge de $table pour afficher les noms des demandeurs liés
8     $table = DB_PREFIXE."lot
9     LEFT JOIN ".DB_PREFIXE."lien_lot_demandeur
10     ON lien_lot_demandeur.lot=lot.lot
11     AND lien_lot_demandeur.petitionnaire_principal IS TRUE
12     LEFT JOIN ".DB_PREFIXE."demandeur
13     ON lien_lot_demandeur.demandeur=demandeur.demandeur ";
14    
15     /* Test SQL pour récupérer les bons champs selon la qualité du demandeur :
16     * particulier ou personne morale*/
17     $case_demandeur = "CASE WHEN demandeur.qualite='particulier'
18     THEN TRIM(CONCAT(demandeur.particulier_nom, ' ', demandeur.particulier_prenom))
19     ELSE TRIM(CONCAT(demandeur.personne_morale_raison_sociale, ' ', demandeur.personne_morale_denomination))
20     END";
21    
22     //Surcharge de $champAffiche pour afficher les noms des demandeurs liés
23     $champAffiche = array(
24     'lot.lot as "'._("lot").'"',
25     $case_demandeur.' "'._("demandeur_nom").'"',
26     'lot.libelle as "'._("libelle").'"',
27     );
28 vpihour 633 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26