/[openfoncier]/trunk/app/dossier_autorisation.php
ViewVC logotype

Diff of /trunk/app/dossier_autorisation.php

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

revision 2280 by softime, Wed Sep 11 14:20:57 2013 UTC revision 2421 by vpihour, Fri Oct 18 10:46:08 2013 UTC
# Line 42  if ( !is_null($idx)){ Line 42  if ( !is_null($idx)){
42      //Récupération des données      //Récupération des données
43      //Données du dossier d'autorisation      //Données du dossier d'autorisation
44      $sqlDonneesDA = "SELECT dossier_autorisation_libelle,      $sqlDonneesDA = "SELECT dossier_autorisation_libelle,
45              eda.libelle as etat,              CASE WHEN etat_dernier_dossier_instruction_accepte IS NULL
46                    THEN eda.libelle
47                    ELSE edda.libelle
48                END as etat,
49              CASE WHEN demandeur.qualite='particulier' THEN              CASE WHEN demandeur.qualite='particulier' THEN
50                  TRIM(CONCAT(civilite.code, ' ', demandeur.particulier_nom, ' ', demandeur.particulier_prenom))                  TRIM(CONCAT(civilite.code, ' ', demandeur.particulier_nom, ' ', demandeur.particulier_prenom))
51              ELSE              ELSE
# Line 78  if ( !is_null($idx)){ Line 81  if ( !is_null($idx)){
81              ON              ON
82                  dossier_autorisation.etat_dossier_autorisation = eda.etat_dossier_autorisation                  dossier_autorisation.etat_dossier_autorisation = eda.etat_dossier_autorisation
83          LEFT JOIN          LEFT JOIN
84                ".DB_PREFIXE."etat_dossier_autorisation as edda
85                ON
86                    dossier_autorisation.etat_dernier_dossier_instruction_accepte = edda.etat_dossier_autorisation
87            LEFT JOIN
88              ".DB_PREFIXE."lien_dossier_autorisation_demandeur              ".DB_PREFIXE."lien_dossier_autorisation_demandeur
89              ON              ON
90                  dossier_autorisation.dossier_autorisation = lien_dossier_autorisation_demandeur.dossier_autorisation                  dossier_autorisation.dossier_autorisation = lien_dossier_autorisation_demandeur.dossier_autorisation
# Line 137  if ( !is_null($idx)){ Line 144  if ( !is_null($idx)){
144                  TRIM(dm_projet_desc)                  TRIM(dm_projet_desc)
145              END              END
146          ) as \"description_projet\",          ) as \"description_projet\",
147          su_cstr_shon1 as \"surface_plancher_destination_habitation\",          REGEXP_REPLACE(CONCAT(
148          su_cstr_shon2 as \"surface_plancher_destination_hebergement_hotelier\",              CASE
149          su_cstr_shon3 as \"surface_plancher_destination_bureaux\",                  WHEN donnees_techniques.su_trsf_shon1 IS NULL
150          su_cstr_shon4 as \"surface_plancher_destination_commerce\",                  THEN ''
151          su_cstr_shon5 as \"surface_plancher_destination_artisanat\",                  ELSE CONCAT('Habitation - ', donnees_techniques.su_trsf_shon1, ' m² <br/>')
152          su_cstr_shon6 as \"surface_plancher_destination_industrie\",              END,
153          su_cstr_shon7 as \"surface_plancher_destination_exploitation\",              CASE
154          su_cstr_shon8 as \"surface_plancher_destination_entrepot\",                  WHEN donnees_techniques.su_trsf_shon2 IS NULL
155          su_cstr_shon9 as \"surface_plancher_destination_service_public\",                  THEN ''
156                    ELSE CONCAT('Hébergement hôtelier - ', donnees_techniques.su_trsf_shon2, ' m² <br/>')
157                END,
158                CASE
159                    WHEN donnees_techniques.su_trsf_shon3 IS NULL
160                    THEN ''
161                    ELSE CONCAT('Bureaux - ', donnees_techniques.su_trsf_shon3, ' m² <br/>')
162                END,
163                CASE
164                    WHEN donnees_techniques.su_trsf_shon4 IS NULL
165                    THEN ''
166                    ELSE CONCAT('Commerce - ', donnees_techniques.su_trsf_shon4, ' m² <br/>')
167                END,
168                CASE
169                    WHEN donnees_techniques.su_trsf_shon5 IS NULL
170                    THEN ''
171                    ELSE CONCAT('Artisanat - ', donnees_techniques.su_trsf_shon5, ' m² <br/>')
172                END,
173                CASE
174                    WHEN donnees_techniques.su_trsf_shon6 IS NULL
175                    THEN ''
176                    ELSE CONCAT('Industrie - ', donnees_techniques.su_trsf_shon6, ' m² <br/>')
177                END,
178                CASE
179                    WHEN donnees_techniques.su_trsf_shon7 IS NULL
180                    THEN ''
181                    ELSE CONCAT('Exploitation agricole ou forestière - ', donnees_techniques.su_trsf_shon7, ' m² <br/>')
182                END,
183                CASE
184                    WHEN donnees_techniques.su_trsf_shon8 IS NULL
185                    THEN ''
186                    ELSE CONCAT('Entrepôt - ', donnees_techniques.su_trsf_shon8, ' m² <br/>')
187                END,
188                CASE
189                    WHEN donnees_techniques.su_trsf_shon9 IS NULL
190                    THEN ''
191                    ELSE CONCAT('Service public ou d''intérêt collectif - ', donnees_techniques.su_trsf_shon9, ' m²')
192                END
193            ), ' <br/>$', '') as \"surface\",
194          co_tot_ind_nb as \"nombre_logement_crees_individuel\",          co_tot_ind_nb as \"nombre_logement_crees_individuel\",
195          co_tot_coll_nb as \"nombre_logement_crees_collectif\"          co_tot_coll_nb as \"nombre_logement_crees_collectif\"
196          FROM          FROM
# Line 191  if ( !is_null($idx)){ Line 236  if ( !is_null($idx)){
236                  civilite.civilite = demandeur.particulier_civilite OR civilite.civilite = demandeur.personne_morale_civilite                  civilite.civilite = demandeur.particulier_civilite OR civilite.civilite = demandeur.personne_morale_civilite
237          WHERE          WHERE
238              dossier.dossier_autorisation = '".$idx."' AND              dossier.dossier_autorisation = '".$idx."' AND
239              dossier.avis_decision IS NOT NULL";              dossier.avis_decision IS NOT NULL
240            ORDER BY dossier.date_decision ASC";
241      $resDonneesDecisionsDA = $f->db->query($sqlDonneesDecisionsDA);      $resDonneesDecisionsDA = $f->db->query($sqlDonneesDecisionsDA);
242      $f->addToLog("app/dossier_autorisation.php : db->query(\"".$sqlDonneesDecisionsDA."\")", VERBOSE_MODE);      $f->addToLog("app/dossier_autorisation.php : db->query(\"".$sqlDonneesDecisionsDA."\")", VERBOSE_MODE);
243      $f->isDatabaseError($resDonneesDecisionsDA);      $f->isDatabaseError($resDonneesDecisionsDA);
# Line 301  if ( !is_null($idx)){ Line 347  if ( !is_null($idx)){
347                      TRIM(dm_projet_desc)                      TRIM(dm_projet_desc)
348                  END                  END
349              ) as \"description_projet\",              ) as \"description_projet\",
350              su_cstr_shon1 as \"surface_plancher_destination_habitation\",              REGEXP_REPLACE(CONCAT(
351              su_cstr_shon2 as \"surface_plancher_destination_hebergement_hotelier\",                  CASE
352              su_cstr_shon3 as \"surface_plancher_destination_bureaux\",                      WHEN donnees_techniques.su_trsf_shon1 IS NULL
353              su_cstr_shon4 as \"surface_plancher_destination_commerce\",                      THEN ''
354              su_cstr_shon5 as \"surface_plancher_destination_artisanat\",                      ELSE CONCAT('Habitation - ', donnees_techniques.su_trsf_shon1, ' m² <br/>')
355              su_cstr_shon6 as \"surface_plancher_destination_industrie\",                  END,
356              su_cstr_shon7 as \"surface_plancher_destination_exploitation\",                  CASE
357              su_cstr_shon8 as \"surface_plancher_destination_entrepot\",                      WHEN donnees_techniques.su_trsf_shon2 IS NULL
358              su_cstr_shon9 as \"surface_plancher_destination_service_public\",                      THEN ''
359                        ELSE CONCAT('Hébergement hôtelier - ', donnees_techniques.su_trsf_shon2, ' m² <br/>')
360                    END,
361                    CASE
362                        WHEN donnees_techniques.su_trsf_shon3 IS NULL
363                        THEN ''
364                        ELSE CONCAT('Bureaux - ', donnees_techniques.su_trsf_shon3, ' m² <br/>')
365                    END,
366                    CASE
367                        WHEN donnees_techniques.su_trsf_shon4 IS NULL
368                        THEN ''
369                        ELSE CONCAT('Commerce - ', donnees_techniques.su_trsf_shon4, ' m² <br/>')
370                    END,
371                    CASE
372                        WHEN donnees_techniques.su_trsf_shon5 IS NULL
373                        THEN ''
374                        ELSE CONCAT('Artisanat - ', donnees_techniques.su_trsf_shon5, ' m² <br/>')
375                    END,
376                    CASE
377                        WHEN donnees_techniques.su_trsf_shon6 IS NULL
378                        THEN ''
379                        ELSE CONCAT('Industrie - ', donnees_techniques.su_trsf_shon6, ' m² <br/>')
380                    END,
381                    CASE
382                        WHEN donnees_techniques.su_trsf_shon7 IS NULL
383                        THEN ''
384                        ELSE CONCAT('Exploitation agricole ou forestière - ', donnees_techniques.su_trsf_shon7, ' m² <br/>')
385                    END,
386                    CASE
387                        WHEN donnees_techniques.su_trsf_shon8 IS NULL
388                        THEN ''
389                        ELSE CONCAT('Entrepôt - ', donnees_techniques.su_trsf_shon8, ' m² <br/>')
390                    END,
391                    CASE
392                        WHEN donnees_techniques.su_trsf_shon9 IS NULL
393                        THEN ''
394                        ELSE CONCAT('Service public ou d''intérêt collectif - ', donnees_techniques.su_trsf_shon9, ' m²')
395                    END
396                ), ' <br/>$', '') as \"surface\",
397              co_tot_ind_nb as \"nombre_logement_crees_individuel\",              co_tot_ind_nb as \"nombre_logement_crees_individuel\",
398              co_tot_coll_nb as \"nombre_logement_crees_collectif\"              co_tot_coll_nb as \"nombre_logement_crees_collectif\"
399              FROM              FROM
# Line 451  if ( !is_null($idx)){ Line 535  if ( !is_null($idx)){
535      $form->setVal("date_depot_DAACT", "-");      $form->setVal("date_depot_DAACT", "-");
536      $form->setVal("date_depot_DOC", "-");      $form->setVal("date_depot_DOC", "-");
537      $form->setVal("description_projet", ($rowPrincDonneesTechniques["description_projet"]!=="")?$rowPrincDonneesTechniques["description_projet"]:"-");      $form->setVal("description_projet", ($rowPrincDonneesTechniques["description_projet"]!=="")?$rowPrincDonneesTechniques["description_projet"]:"-");
538      $val= _("Habitation ").(($rowPrincDonneesTechniques["surface_plancher_destination_habitation"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_habitation"]:" -").' m²<br/>'.      $form->setVal("surface",($rowPrincDonneesTechniques["surface"]!=="")?$rowPrincDonneesTechniques["surface"]:"-");
         _("Hebergment hotelier ").(($rowPrincDonneesTechniques["surface_plancher_destination_hebergement_hotelier"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_hebergement_hotelier"]:" -").' m²<br/>'.  
         _("Bureaux ").(($rowPrincDonneesTechniques["surface_plancher_destination_bureaux"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_bureaux"]:" -").' m²<br/>'.  
         _("Commerce ").(($rowPrincDonneesTechniques["surface_plancher_destination_commerce"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_commerce"]:" -").' m²<br/>'.  
         _("Artisanat ").(($rowPrincDonneesTechniques["surface_plancher_destination_artisanat"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_artisanat"]:" -").' m²<br/>'.  
         _("Industrie ").(($rowPrincDonneesTechniques["surface_plancher_destination_industrie"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_industrie"]:" -").' m²<br/>'.  
         _("Exploitation agricole ou forestiere ").(($rowPrincDonneesTechniques["surface_plancher_destination_exploitation"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_exploitation"]:" -").' m²<br/>'.  
         _("Entrepot ").(($rowPrincDonneesTechniques["surface_plancher_destination_entrepot"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_entrepot"]:" -").' m²<br/>'.  
         _("Service public ou d'interet collectif ").(($rowPrincDonneesTechniques["surface_plancher_destination_service_public"]!=="")?$rowPrincDonneesTechniques["surface_plancher_destination_service_public"]:" -").' m²';  
     $form->setVal("surface",$val);  
539      $form->setVal("nombre_logement_crees_individuel", ($rowPrincDonneesTechniques["nombre_logement_crees_individuel"]!=="")?$rowPrincDonneesTechniques["nombre_logement_crees_individuel"]:"-");      $form->setVal("nombre_logement_crees_individuel", ($rowPrincDonneesTechniques["nombre_logement_crees_individuel"]!=="")?$rowPrincDonneesTechniques["nombre_logement_crees_individuel"]:"-");
540      $form->setVal("nombre_logement_crees_collectif", ($rowPrincDonneesTechniques["nombre_logement_crees_collectif"]!=="")?$rowPrincDonneesTechniques["nombre_logement_crees_collectif"]:"-");      $form->setVal("nombre_logement_crees_collectif", ($rowPrincDonneesTechniques["nombre_logement_crees_collectif"]!=="")?$rowPrincDonneesTechniques["nombre_logement_crees_collectif"]:"-");
541      $form->setVal("donnees_techniques", "");      $form->setVal("donnees_techniques", "");
# Line 702  if ( !is_null($idx)){ Line 777  if ( !is_null($idx)){
777          $form->setVal("demandeur", $rowDonneesDI["demandeur"]);          $form->setVal("demandeur", $rowDonneesDI["demandeur"]);
778          $form->setVal("date_limite", $rowDateImpDI["date_limite"]);          $form->setVal("date_limite", $rowDateImpDI["date_limite"]);
779          $form->setVal("description_projet", ($rowPrincDonneesTechniquesDI["description_projet"]!=="")?$rowPrincDonneesTechniquesDI["description_projet"]:"-");          $form->setVal("description_projet", ($rowPrincDonneesTechniquesDI["description_projet"]!=="")?$rowPrincDonneesTechniquesDI["description_projet"]:"-");
780          $val= _("Habitation ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_habitation"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_habitation"]:" -").' m²<br/>'.          $form->setVal("surface",($rowPrincDonneesTechniquesDI["surface"]!=="")?$rowPrincDonneesTechniquesDI["surface"]:"-");
             _("Hebergment hotelier ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_hebergement_hotelier"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_hebergement_hotelier"]:" -").' m²<br/>'.  
             _("Bureaux ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_bureaux"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_bureaux"]:" -").' m²<br/>'.  
             _("Commerce ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_commerce"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_commerce"]:" -").' m²<br/>'.  
             _("Artisanat ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_artisanat"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_artisanat"]:" -").' m²<br/>'.  
             _("Industrie ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_industrie"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_industrie"]:" -").' m²<br/>'.  
             _("Exploitation agricole ou forestiere ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_exploitation"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_exploitation"]:" -").' m²<br/>'.  
             _("Entrepot ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_entrepot"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_entrepot"]:" -").' m²<br/>'.  
             _("Service public ou d'interet collectif ").(($rowPrincDonneesTechniquesDI["surface_plancher_destination_service_public"]!=="")?$rowPrincDonneesTechniquesDI["surface_plancher_destination_service_public"]:" -").' m²';  
         $form->setVal("surface",$val);  
781          $form->setVal("nombre_logement_crees_individuel", ($rowPrincDonneesTechniquesDI["nombre_logement_crees_individuel"]!=="")?$rowPrincDonneesTechniquesDI["nombre_logement_crees_individuel"]:"-");          $form->setVal("nombre_logement_crees_individuel", ($rowPrincDonneesTechniquesDI["nombre_logement_crees_individuel"]!=="")?$rowPrincDonneesTechniquesDI["nombre_logement_crees_individuel"]:"-");
782          $form->setVal("nombre_logement_crees_collectif", ($rowPrincDonneesTechniquesDI["nombre_logement_crees_collectif"]!=="")?$rowPrincDonneesTechniquesDI["nombre_logement_crees_collectif"]:"-");          $form->setVal("nombre_logement_crees_collectif", ($rowPrincDonneesTechniquesDI["nombre_logement_crees_collectif"]!=="")?$rowPrincDonneesTechniquesDI["nombre_logement_crees_collectif"]:"-");
783            

Legend:
Removed from v.2280  
changed lines
  Added in v.2421

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26