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

Contents of /trunk/sql/pgsql/dossier.scr.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 197 - (show annotations)
Sun Oct 16 19:03:32 2011 UTC (13 years, 3 months ago) by fraynaud
Original Path: trunk/sql/pgsql/dossier.scr.inc
File size: 2688 byte(s)
mise au point du dossier
rajout statistiques + shon ...
correction bug creation ometat consultation



1 <?php
2 //$Id: dossier.scr.inc,v 1.3 2010-08-22 21:40:12 fraynaud Exp $
3 $sql_dossier="select
4 dossier,nature.libelle as nature,
5 demandeur_civilite,demandeur_nom,demandeur_societe,
6 demandeur_adresse,demandeur_cp,demandeur_ville,
7 terrain_numero, terrain_adresse, terrain_cp, terrain_ville, rivoli,parcelle,
8 terrain_surface, hauteur, shon, shob, batiment_nombre, logement_nombre, delai,
9 to_char(date_depot,'DD/MM/YYYY') as date_depot,
10 to_char(date_validite,'DD/MM/YYYY') as date_validite,
11 to_char(date_chantier,'DD/MM/YYYY') as date_chantier,
12 to_char(date_achevement,'DD/MM/YYYY') as date_achevement,
13 to_char(date_conformite,'DD/MM/YYYY') as date_conformite,
14 to_char(date_complet,'DD/MM/YYYY') as date_complet,
15 to_char(date_notification_delai,'DD/MM/YYYY') as date_notification_delai,
16 to_char(date_limite,'DD/MM/YYYY') as date_limite,
17 travaux.libelle as travaux, servitude,
18 amenagement,parcelle_lot_lotissement
19 from dossier inner join nature on nature.nature = dossier.nature
20 left join travaux on dossier.travaux=travaux.travaux
21 where dossier = '".$id."'";
22
23 $sql_instruction="SELECT instruction,evenement.libelle as evenement, instruction.lettretype,
24 to_char(datecourrier,'DD/MM/YYYY') as datecourrier from instruction inner join evenement on evenement.evenement = instruction.evenement
25 where dossier = '".$id."'";
26
27 $sql_consultation="select consultation,(service.libelle||' '||to_char(date_envoi,'DD/MM/YYYY')) as envoi,
28 to_char(date_retour,'DD/MM/YYYY') as retour,
29 to_char(date_limite,'DD/MM/YYYY') as limite,
30 avis.libelle as avis
31 from consultation inner join service on service.service = consultation.service
32 left join avis on avis.avis=consultation.avis
33 where consultation.dossier = '".$id."'";
34
35 $sql_terrain ="SELECT terrain.parcelle, (proprietaire.nom|| ' '|| proprietaire.prenom) as proprietaire,
36 parcelle.surface from terrain inner join parcelle on terrain.parcelle = parcelle.parcelle left join proprietaire on proprietaire.proprietaire = parcelle.proprietaire
37 where dossier = '".$id."'";
38
39 $sql_destination_shon="SELECT destination_shon as no,destination.libelle, shon,
40 shon_anterieure, shon_demolie, shon_anterieure_supprimee,
41 shon_nouvelle, shon_nouvelle_transformee, shon_shob_transformee
42 from destination_shon inner join destination on destination_shon.destination=destination.destination
43 where dossier = '".$id."'";
44
45 $sql_modificatif="select dossier,
46 (dossier||' '||types||' du '||to_char(date_demande,'DD/MM/YYYY')) as demande,
47 demandeur_nom,etat from dossier
48 where substring(dossier,1,9) like substring('".$id."',1,9)";
49
50 $sql_statistique= "select * from statistique where dossier='".$id."'";
51
52 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26