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

Diff of /trunk/sql/pgsql/dossier_validite.reqmo.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1137 by vpihour, Thu Oct 11 08:27:21 2012 UTC revision 1138 by nhaye, Thu Jan 3 15:18:21 2013 UTC
# Line 1  Line 1 
1  <?php  <?php
2  $reqmo['libelle']="dossier_validite_reqmo";  $reqmo['libelle']="dossier_validite_reqmo";
3  $reqmo['sql']="select dossier,  $reqmo['sql']="SELECT dossier,
4                        [dossier.nature as nature],                      [dossier_autorisation_type_detaille.code as nature],
5                        [etat],                      [dossier.etat as etat],
6                        [accord_tacite],                      [accord_tacite],
7                        [to_char(date_decision,'DD/MM/YYYY') as date_decision],                      [to_char(date_decision,'DD/MM/YYYY') as date_decision],
8                        [avis_decision],                      [avis_decision],
9                        to_char(date_validite,'DD/MM/YYYY') as date_validite,                      to_char(date_validite,'DD/MM/YYYY') as date_validite,
10                        demandeur_civilite,                      demandeur_civilite,
11                        demandeur_nom,                      demandeur_nom,
12                        demandeur_societe,                      demandeur_societe,
13                        demandeur_adresse,                      demandeur_adresse,
14                        demandeur_cp,                      demandeur_cp,
15                        demandeur_ville,                      demandeur_ville,
16                        [demandeur_pays],                      [demandeur_pays],
17                        [demandeur_telephone],                      [demandeur_telephone],
18                        [demandeur_email]                      [demandeur_email]
19                         from ".DB_PREFIXE."dossier left join ".DB_PREFIXE."travaux on travaux.travaux = dossier.travaux                      FROM ".DB_PREFIXE."dossier
20                         left join ".DB_PREFIXE."categorie_demandeur on categorie_demandeur.categorie_demandeur= dossier.demandeur_categorie                      INNER JOIN ".DB_PREFIXE."dossier_autorisation
21                         where dossier.nature = '[selection]'                          ON dossier.dossier_autorisation=dossier_autorisation.dossier_autorisation
22                         and to_char(date_validite,'YYYY') = '[annee]'                      INNER JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille
23                         and to_char(date_validite,'MM')  = '[mois]'                          ON dossier_autorisation.dossier_autorisation_type_detaille
24                         and etat='accepter'                          = dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
25                         order by [tri]";                      LEFT JOIN ".DB_PREFIXE."travaux on travaux.travaux = dossier.travaux
26                        LEFT JOIN ".DB_PREFIXE."categorie_demandeur on categorie_demandeur.categorie_demandeur= dossier.demandeur_categorie
27                        WHERE dossier_autorisation_type_detaille.code = '[selection]'
28                        and to_char(date_validite,'YYYY') = '[annee]'
29                        and to_char(date_validite,'MM')  = '[mois]'
30                        and dossier.etat='accepter'
31                        order by [tri]";
32    
33  $reqmo['selection']= array('PC','PD','DP','PA','CU');  $reqmo['selection']= array('PCI','PCA','PD','DP','PA','CU','AZ','DAT');
34  $reqmo['mois']= array('01','02','03','04','05','06','07','08','09','10','11','12');  $reqmo['mois']= array('01','02','03','04','05','06','07','08','09','10','11','12');
35  $reqmo['annee']= array(date('Y'),date('Y')+1,date('Y')+2,date('Y')+3,date('Y')+4);  $reqmo['annee']= array(date('Y'),date('Y')+1,date('Y')+2,date('Y')+3,date('Y')+4);
36  $reqmo['tri']= array('dossier','etat','demandeur_nom');  $reqmo['tri']= array('dossier','etat','demandeur_nom');

Legend:
Removed from v.1137  
changed lines
  Added in v.1138

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26