17 |
**/ |
**/ |
18 |
function getCerfa(){ |
function getCerfa(){ |
19 |
if($this->getParameter("retourformulaire") == "lot") { |
if($this->getParameter("retourformulaire") == "lot") { |
20 |
$sql = "SELECT cerfa_lot FROM ".DB_PREFIXE."dossier_instruction_type |
$sql = "SELECT cerfa_lot FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
21 |
|
JOIN ".DB_PREFIXE."dossier_instruction_type ON dossier_instruction_type.dossier_autorisation_type_detaille= |
22 |
|
dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
23 |
JOIN ".DB_PREFIXE."dossier ON dossier.dossier_instruction_type= |
JOIN ".DB_PREFIXE."dossier ON dossier.dossier_instruction_type= |
24 |
dossier_instruction_type.dossier_instruction_type |
dossier_instruction_type.dossier_instruction_type |
25 |
JOIN ".DB_PREFIXE."lien_dossier_lot ON dossier.dossier=lien_dossier_lot.dossier |
JOIN ".DB_PREFIXE."lot ON dossier.dossier=lot.dossier |
26 |
WHERE lien_dossier_lot.lot = ".$this->getParameter("idxformulaire"); |
WHERE lot.lot = ".$this->getParameter("idxformulaire"); |
27 |
|
|
28 |
|
} elseif($this->getParameter("retourformulaire") == "dossier_autorisation"){ |
29 |
|
$sql = "SELECT cerfa FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
30 |
|
JOIN ".DB_PREFIXE."dossier_instruction_type ON dossier_instruction_type.dossier_autorisation_type_detaille= |
31 |
|
dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
32 |
|
JOIN ".DB_PREFIXE."dossier ON dossier.dossier_instruction_type= |
33 |
|
dossier_instruction_type.dossier_instruction_type |
34 |
|
WHERE dossier_autorisation = '"; |
35 |
|
$sql .= $this->getParameter("idxformulaire")."'"; |
36 |
} else { |
} else { |
37 |
$sql = "SELECT cerfa FROM ".DB_PREFIXE."dossier_instruction_type |
$sql = "SELECT cerfa FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
38 |
|
JOIN ".DB_PREFIXE."dossier_instruction_type ON dossier_instruction_type.dossier_autorisation_type_detaille= |
39 |
|
dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
40 |
JOIN ".DB_PREFIXE."dossier ON dossier.dossier_instruction_type= |
JOIN ".DB_PREFIXE."dossier ON dossier.dossier_instruction_type= |
41 |
dossier_instruction_type.dossier_instruction_type |
dossier_instruction_type.dossier_instruction_type |
42 |
WHERE dossier = '"; |
WHERE dossier = '"; |
53 |
if(!empty($cerfa)) { |
if(!empty($cerfa)) { |
54 |
require_once ("../obj/cerfa.class.php"); |
require_once ("../obj/cerfa.class.php"); |
55 |
$this->cerfa = new cerfa($cerfa, $this->db, DEBUG); |
$this->cerfa = new cerfa($cerfa, $this->db, DEBUG); |
56 |
|
//On vérifie que le cerfa est en cours de validité |
57 |
|
$date_debut = new DateTime($this->cerfa->getVal("om_validite_debut")); |
58 |
|
$date_debut = $date_debut->format('Ymd'); |
59 |
|
|
60 |
|
$date_fin = new DateTime($this->cerfa->getVal("om_validite_fin")); |
61 |
|
$date_fin = $date_fin->format('Ymd'); |
62 |
|
|
63 |
|
$date_aujourdhui = date('Ymd'); |
64 |
|
|
65 |
|
// Teste si le cerfa est en cours de validité |
66 |
|
$is_encours = true; |
67 |
|
if ( $date_aujourdhui < $date_debut || $date_aujourdhui > $date_fin ){ |
68 |
|
$is_encours = false; |
69 |
|
} |
70 |
|
|
71 |
|
//Si le cerfa n'est pas en cours de validité, on affiche pas le formulaire |
72 |
|
//et on affiche un message d'erreur |
73 |
|
if ( $is_encours == false){ |
74 |
|
$this->f->displayMessage("error", _("Aucun cerfa en cours de validite lie a ce dossier")); |
75 |
|
die(); |
76 |
|
} |
77 |
} else { |
} else { |
78 |
$this->f->displayMessage("error", _("Aucun cerfa lie a ce type de dossier")); |
$this->f->displayMessage("error", _("Aucun cerfa lie a ce type de dossier")); |
79 |
die(); |
die(); |
134 |
$form->setSelect('terr_juri_desc',$value); |
$form->setSelect('terr_juri_desc',$value); |
135 |
$form->setSelect('terr_div_surf_etab',$value); |
$form->setSelect('terr_div_surf_etab',$value); |
136 |
$form->setSelect('terr_div_surf_av_div',$value); |
$form->setSelect('terr_div_surf_av_div',$value); |
137 |
|
|
138 |
|
|
139 |
|
//Récupérer le nom et le prénom de l'architecte |
140 |
|
$coordonneesArchitecte = $this->getPrenomNomArchitecte($this->getVal('architecte')); |
141 |
|
$value = ""; |
142 |
|
if ($maj<2){ |
143 |
|
$value = array( |
144 |
|
"data" => $coordonneesArchitecte, |
145 |
|
"obj" => "architecte", |
146 |
|
); |
147 |
|
} |
148 |
|
else { |
149 |
|
$value[0][0]=$this->getVal('architecte'); |
150 |
|
$value[1][0]=$coordonneesArchitecte;// table |
151 |
|
} |
152 |
|
$form->setSelect('architecte', $value); |
153 |
} |
} |
154 |
|
|
155 |
|
|
316 |
$form->setType('terr_juri_afu','select'); |
$form->setType('terr_juri_afu','select'); |
317 |
$form->setType('terr_juri_pup','select'); |
$form->setType('terr_juri_pup','select'); |
318 |
$form->setType('terr_juri_oin','select'); |
$form->setType('terr_juri_oin','select'); |
319 |
|
$form->setType('architecte', 'manage_with_popup'); |
320 |
|
|
321 |
} elseif($maj == 1) { |
} elseif($maj == 1) { |
322 |
$form->setType('terr_juri_titul','select'); |
$form->setType('terr_juri_titul','select'); |
325 |
$form->setType('terr_juri_afu','select'); |
$form->setType('terr_juri_afu','select'); |
326 |
$form->setType('terr_juri_pup','select'); |
$form->setType('terr_juri_pup','select'); |
327 |
$form->setType('terr_juri_oin','select'); |
$form->setType('terr_juri_oin','select'); |
328 |
|
$form->setType('architecte', 'manage_with_popup'); |
329 |
|
|
330 |
} elseif($maj == 2) { |
} elseif($maj == 2) { |
331 |
$form->setType('terr_juri_titul','selectstatic'); |
$form->setType('terr_juri_titul','selectstatic'); |
334 |
$form->setType('terr_juri_afu','selectstatic'); |
$form->setType('terr_juri_afu','selectstatic'); |
335 |
$form->setType('terr_juri_pup','selectstatic'); |
$form->setType('terr_juri_pup','selectstatic'); |
336 |
$form->setType('terr_juri_oin','selectstatic'); |
$form->setType('terr_juri_oin','selectstatic'); |
337 |
|
$form->setType('architecte', 'selectstatic'); |
338 |
|
|
339 |
} elseif($maj == 3) { |
} elseif($maj == 3) { |
340 |
$form->setType('terr_juri_titul','selectstatic'); |
$form->setType('terr_juri_titul','selectstatic'); |
343 |
$form->setType('terr_juri_afu','selectstatic'); |
$form->setType('terr_juri_afu','selectstatic'); |
344 |
$form->setType('terr_juri_pup','selectstatic'); |
$form->setType('terr_juri_pup','selectstatic'); |
345 |
$form->setType('terr_juri_oin','selectstatic'); |
$form->setType('terr_juri_oin','selectstatic'); |
346 |
|
$form->setType('architecte', 'selectstatic'); |
347 |
|
|
348 |
} |
} |
349 |
|
|
459 |
} |
} |
460 |
|
|
461 |
function setLayout(&$form, $maj) { |
function setLayout(&$form, $maj) { |
462 |
/*Fieldset Parametrage du cerfa */ |
/*Fieldset Parametrage du cerfa */ |
463 |
$form->setBloc('cerfa','D',"","col_12"); |
$form->setBloc('cerfa','D',"","col_12"); |
464 |
$form->setFieldset('cerfa','D' |
$form->setFieldset('cerfa','D' |
465 |
,_("Parametrage du cerfa")); |
,_("Parametrage du cerfa")); |
466 |
|
$form->setBloc('cerfa','D',"", "alignFormSpec"); |
467 |
|
$form->setBloc('code','F'); |
468 |
|
$form->setBloc('om_validite_debut','D',"", "alignFormSpec-type-date"); |
469 |
|
$form->setBloc('om_validite_fin','F'); |
470 |
|
|
471 |
$form->setFieldset('om_validite_fin','F',''); |
$form->setFieldset('om_validite_fin','F',''); |
472 |
$form->setBloc('om_validite_fin','F'); |
$form->setBloc('om_validite_fin','F'); |
473 |
|
|
474 |
|
// Terrain |
475 |
$form->setBloc('terr_juri_titul','D',"","col_12"); |
$form->setBloc('terr_juri_titul','D',"","col_12"); |
476 |
$form->setFieldset('terr_juri_titul','D' |
$form->setFieldset('terr_juri_titul','D' |
477 |
,_("Terrain")); |
,_("Terrain"), "startClosed"); |
478 |
$form->setBloc('terr_juri_titul','D',_("Situation juridique du terrain"),"col_12"); |
|
479 |
$form->setBloc('terr_juri_desc','F'); |
$form->setBloc('terr_juri_titul','D',_("Situation juridique du terrain"), "col_12 alignFormSpec"); |
480 |
$form->setBloc('terr_div_surf_etab','D',_("Terrain issu d'une division de propriete"),"col_12"); |
$form->setBloc('terr_juri_oin','F'); |
481 |
$form->setBloc('terr_div_surf_av_div','F'); |
$form->setBloc('terr_juri_desc','DF',"", "group"); |
482 |
|
$form->setBloc('terr_div_surf_etab','D',_("Terrain issu d'une division de propriete"), "col_12 alignFormSpec"); |
483 |
|
$form->setBloc('terr_div_surf_av_div', 'F'); |
484 |
|
|
485 |
$form->setFieldset('terr_div_surf_av_div','F',''); |
$form->setFieldset('terr_div_surf_av_div','F',''); |
486 |
|
|
487 |
$form->setBloc('terr_div_surf_av_div','F'); |
$form->setBloc('terr_div_surf_av_div','F'); |
488 |
|
|
489 |
$form->setBloc('avap_co_elt_pro','D',"","col_12"); |
// Aménager |
|
$form->setFieldset('avap_co_elt_pro','D' |
|
|
,_("Projet")); |
|
|
|
|
|
|
|
|
$form->setFieldset('avap_aut_auv_elec','F',''); |
|
|
$form->setBloc('avap_aut_auv_elec','F'); |
|
|
|
|
|
|
|
|
$form->setBloc('tr_total','D',"","col_12"); |
|
|
$form->setFieldset('tr_total','D' |
|
|
,_("Projet")); |
|
|
|
|
|
|
|
|
$form->setFieldset('tr_desc','F',''); |
|
|
$form->setBloc('tr_desc','F'); |
|
|
|
|
|
/*Fieldset n°4 Ouverture de chantier */ |
|
|
$form->setBloc('doc_date','D',"","col_12"); |
|
|
$form->setFieldset('doc_date','D' |
|
|
,_("Ouverture de chantier")); |
|
|
|
|
|
$form->setFieldset('doc_nb_log_autre','F',''); |
|
|
$form->setBloc('doc_nb_log_autre','F'); |
|
|
|
|
|
/*Fieldset n°4 Achèvement des travaux */ |
|
|
$form->setBloc('daact_date','D',"","col_12"); |
|
|
$form->setFieldset('daact_date','D' |
|
|
,_("Achevement des travaux")); |
|
|
|
|
|
$form->setFieldset('daact_nb_log_autre','F',''); |
|
|
$form->setBloc('daact_nb_log_autre','F'); |
|
|
|
|
|
/*Fieldset n°4 Projet d'aménagement */ |
|
490 |
$form->setBloc('am_lotiss','D',"","col_12"); |
$form->setBloc('am_lotiss','D',"","col_12"); |
491 |
$form->setFieldset('am_lotiss','D' |
$form->setFieldset('am_lotiss','D' |
492 |
,_("Projet d'amenagement")); |
,_("Amenager"), "startClosed"); |
493 |
// bloc 4.1 |
$form->setBloc('am_lotiss','D',"","col_12"); |
494 |
$form->setBloc('am_lotiss','D',_("Nature des travaux, instalations |
$form->setFieldset('am_lotiss','D' |
495 |
ou amenagements envisages"),"col_12"); |
,_("Projet d'amenagement"), "startClosed alignFormSpec"); |
496 |
|
// bloc 4.1 |
497 |
|
$form->setBloc('am_lotiss','DF',_("Nature des travaux, installations |
498 |
|
ou amenagements envisages"), "group"); |
499 |
|
$form->setBloc('am_div_mun','DF',"", "group"); |
500 |
|
$form->setBloc('am_autre_div','DF',"", "group"); |
501 |
|
$form->setBloc('am_camping','DF',"", "group"); |
502 |
|
$form->setBloc('am_parc_resid_loi','DF',"", "group"); |
503 |
|
$form->setBloc('am_sport_moto','DF',"", "group"); |
504 |
|
$form->setBloc('am_sport_attrac','DF',"", "group"); |
505 |
|
$form->setBloc('am_sport_golf','DF',"", "group"); |
506 |
|
$form->setBloc('am_caravane','DF',"", "group"); |
507 |
|
$form->setBloc('am_carav_duree','DF',"", "group"); |
508 |
|
$form->setBloc('am_statio','DF',"", "group"); |
509 |
|
$form->setBloc('am_statio_cont','DF',"", "group"); |
510 |
|
$form->setBloc('am_affou_exhau','DF',"", "group"); |
511 |
|
$form->setBloc('am_affou_exhau_sup','DF',"", "group"); |
512 |
|
$form->setBloc('am_affou_prof','DF',"", "group"); |
513 |
|
$form->setBloc('am_exhau_haut','DF',"", "group"); |
514 |
|
|
515 |
|
$form->setBloc('am_chem_ouv_esp','D',_("Dans les secteurs proteges :"),"col_12"); |
516 |
|
$form->setBloc('am_chem_ouv_esp','DF',_("Amenagement situe dans un espace remarquable :"), "group"); |
517 |
|
$form->setBloc('am_agri_peche','DF',"", "group"); |
518 |
|
|
519 |
|
$form->setBloc('am_crea_voie','DF',_("Amenagement situe dans un secteur sauvegarde :"), "group"); |
520 |
|
$form->setBloc('am_modif_voie_exist','DF',"", "group"); |
521 |
|
$form->setBloc('am_crea_esp_sauv','DF',"", "group"); |
522 |
|
|
523 |
|
$form->setBloc('am_crea_esp_class','DF',_("Amenagement situe dans un site classe ou une reserve naturelle 1 :"), "group"); |
524 |
|
$form->setBloc('am_coupe_abat','DF',"", "group"); |
525 |
|
$form->setBloc('am_prot_plu','DF',"", "group"); |
526 |
|
$form->setBloc('am_prot_muni','DF',"", "group"); |
527 |
|
$form->setBloc('am_mobil_voyage','DF',"", "group"); |
528 |
|
$form->setBloc('am_aire_voyage','DF',"", "group"); |
529 |
|
$form->setBloc('am_rememb_afu','DF',"", "group"); |
530 |
|
$form->setBloc('am_rememb_afu','F'); |
531 |
|
|
532 |
|
$form->setBloc('am_mob_art','DF',_("Dans un secteur sauvegarde, site classe ou reserve naturelle :"), "group"); |
533 |
|
$form->setBloc('am_modif_voie_esp','DF',"", "group"); |
534 |
|
$form->setBloc('am_plant_voie_esp','DF',"", "group"); |
535 |
|
|
536 |
|
$form->setFieldset('am_plant_voie_esp','F',''); |
537 |
|
$form->setBloc('am_plant_voie_esp','F'); |
538 |
|
$form->setBloc('am_projet_desc','D',"","col_12"); |
539 |
|
$form->setFieldset('am_projet_desc','D' |
540 |
|
,_("Description amenagement"), "startClosed"); |
541 |
|
|
542 |
|
$form->setBloc('am_projet_desc','DF',"", "group"); |
543 |
|
$form->setBloc('am_terr_surf','DF',"", "alignFormSpec"); |
544 |
|
$form->setBloc('am_tranche_desc','DF',"", "group"); |
545 |
|
$form->setFieldset('am_tranche_desc','F',''); |
546 |
$form->setBloc('am_tranche_desc','F'); |
$form->setBloc('am_tranche_desc','F'); |
547 |
|
$form->setBloc('am_lot_max_nb','D',"","col_12"); |
548 |
// bloc 4.2 |
$form->setFieldset('am_lot_max_nb','D' |
549 |
$form->setBloc('am_lot_max_nb','D',_("Demande concernant un lotissement"),"col_12"); |
,_("Complement d'amenagement"), "startClosed"); |
550 |
|
// bloc 4.2 |
551 |
|
$form->setBloc('am_lot_max_nb','D',_("Demande concernant un lotissement"),"col_12 alignFormSpec"); |
552 |
|
|
553 |
|
$form->setBloc('am_lot_max_nb','DF',"", "group"); |
554 |
|
$form->setBloc('am_lot_max_shon','DF',"", "group"); |
555 |
|
|
556 |
|
$form->setBloc('am_lot_cstr_cos','DF',_("Comment la constructibilite globale sera-t-elle repartie ?"), "group"); |
557 |
|
$form->setBloc('am_lot_cstr_plan','DF',"", "group"); |
558 |
|
$form->setBloc('am_lot_cstr_vente','DF',"", "group"); |
559 |
|
$form->setBloc('am_lot_fin_diff','DF',"", "group"); |
560 |
|
|
561 |
|
$form->setBloc('am_lot_consign','DF',_("si oui, quelle garantie sera utilisee ?"), "group"); |
562 |
|
$form->setBloc('am_lot_gar_achev','DF',"", "group"); |
563 |
|
$form->setBloc('am_lot_vente_ant','DF',"", "group"); |
564 |
|
$form->setBloc('am_lot_vente_ant','F'); |
565 |
|
|
566 |
|
// bloc 4.3 |
567 |
|
$form->setBloc('am_exist_agrand','D',_("Amenagement d'un camping ou |
568 |
|
d'un terrain amenage en vue de l'hebergement |
569 |
|
touristique"),"col_12"); |
570 |
|
|
571 |
|
$form->setBloc('am_exist_agrand','DF',"", "alignFormSpec"); |
572 |
|
$form->setBloc('am_exist_date','DF',"", "alignFormSpec-type-date"); |
573 |
|
$form->setBloc('am_exist_num','D',"", "alignFormSpec"); |
574 |
|
$form->setBloc('am_empl_nb','F',"", ""); |
575 |
|
|
576 |
|
$form->setBloc('am_tente_nb','D',_("Nombre maximum d’emplacements reserves aux :"), "col_12 alignForm"); |
577 |
|
$form->setBloc('am_mobil_nb','F',"", ""); |
578 |
|
|
579 |
|
$form->setBloc('am_pers_nb','DF',"", "alignFormSpec group"); |
580 |
|
|
581 |
|
$form->setBloc('am_empl_hll_nb','D',_("Implantation d’habitations legeres de loisirs (HLL) :"), "col_12 alignFormSpec"); |
582 |
|
//$form->setBloc('am_empl_hll_nb','DF',"", "group"); |
583 |
|
$form->setBloc('am_hll_shon','F'); |
584 |
|
|
585 |
|
$form->setBloc('am_periode_exploit','DF',"", "group"); |
586 |
|
|
587 |
|
$form->setBloc('am_coupe_bois','D',_("Declaration de coupe et/ou abattage d’arbres :"),"col_12 cerfasubtitle"); |
588 |
|
|
589 |
|
$form->setBloc('am_coupe_bois','D',_("Courte description du lieu :"), "cerfasubtitle alignForm"); |
590 |
|
$form->setBloc('am_coupe_align','F',"", ""); |
591 |
|
|
592 |
|
$form->setBloc('am_coupe_ess','D',_("Nature du boisement :"),"col_12 cerfasubtitle alignForm"); |
593 |
|
$form->setBloc('am_coupe_autr','F'); |
594 |
|
$form->setBloc('am_coupe_autr','F'); |
595 |
|
|
596 |
|
$form->setBloc('am_coupe_autr','F'); |
597 |
|
|
|
$form->setBloc('am_lot_vente_ant','F'); |
|
|
|
|
|
// bloc 4.3 |
|
|
$form->setBloc('am_empl_nb','D',_("Amenagement d'un camping ou |
|
|
d'un terrain amenage en vue de l'hebergement |
|
|
touristique"),"col_12"); |
|
|
|
|
|
$form->setBloc('am_exist_agrand','F'); |
|
598 |
|
|
599 |
|
$form->setFieldset('am_coupe_autr','F',''); |
600 |
|
|
601 |
|
$form->setBloc('am_coupe_autr','F'); |
602 |
$form->setFieldset('am_coupe_autr','F',''); |
$form->setFieldset('am_coupe_autr','F',''); |
|
|
|
603 |
$form->setBloc('am_coupe_autr','F'); |
$form->setBloc('am_coupe_autr','F'); |
604 |
|
// Fin amménager |
605 |
/*Fieldset n°5 Projet de construction */ |
// Construire |
606 |
$form->setBloc('co_archi_recours','D',"","col_12"); |
$form->setBloc('co_archi_recours','D',"","col_12"); |
607 |
$form->setFieldset('co_archi_recours','D' |
$form->setFieldset('co_archi_recours','D' |
608 |
,_("Projet de construction")); |
,_("Construire"), "startClosed"); |
609 |
// bloc 5.1 |
$form->setBloc('co_archi_recours','D', "","col_12"); |
610 |
$form->setBloc('co_archi_recours','D',_("Architecte"),"col_12"); |
$form->setFieldset('co_archi_recours','D' |
611 |
|
,_("Projet construction"), "startClosed"); |
612 |
$form->setBloc('co_archi_recours','DF', "","group"); |
|
613 |
|
$form->setBloc('co_archi_recours','D',_("Architecte"), "col_12"); |
614 |
$form->setBloc('co_archi_nom','D', "","group"); |
$form->setBloc('co_archi_recours','DF',"", "alignFormSpec group"); |
615 |
$form->setBloc('co_archi_prenom','F'); |
$form->setBloc('architecte','DF', "", "group"); |
616 |
|
$form->setBloc('architecte','F'); |
617 |
$form->setBloc('co_archi_adr_num','D', "","group"); |
|
618 |
$form->setBloc('co_archi_adr_voie','F'); |
$form->setBloc('co_cstr_nouv','D',_("Nature du projet"), "col_12 alignFormSpec"); |
619 |
|
$form->setBloc('co_cloture','F'); |
620 |
$form->setBloc('co_archi_adr_lieu_dit','D', "","group"); |
$form->setBloc('co_projet_desc','DF',"", "group"); |
621 |
$form->setBloc('co_archi_adr_localite','F'); |
$form->setBloc('co_elec_tension','DF', "", "alignFormSpec"); |
622 |
|
$form->setFieldset('co_elec_tension','F',''); |
623 |
$form->setBloc('co_archi_adr_cp','D', "","group"); |
$form->setFieldset('co_anx_pisc','D' |
624 |
$form->setBloc('co_archi_adr_cedex','F'); |
,_("Complement construction"), "startClosed"); |
625 |
|
|
626 |
$form->setBloc('co_archi_no_incri','DF', "","group"); |
$form->setBloc('co_anx_pisc','D',"", "alignForm"); |
627 |
|
$form->setBloc('co_anx_autr','F',"", ""); |
628 |
$form->setBloc('co_archi_cg','DF', "","group"); |
$form->setBloc('co_anx_autr_desc','DF',"", "group"); |
629 |
|
|
630 |
$form->setBloc('co_archi_tel1','D', "","group"); |
$form->setBloc('co_tot_log_nb','D',"", "alignForm"); |
631 |
$form->setBloc('co_archi_tel2','F'); |
$form->setBloc('co_tot_coll_nb','F',"", ""); |
632 |
|
|
633 |
$form->setBloc('co_archi_mail','DF', "","group"); |
$form->setBloc('co_mais_piece_nb','D',"", "alignForm"); |
634 |
|
$form->setBloc('co_mais_niv_nb','F',"", ""); |
635 |
$form->setBloc('co_archi_mail','F'); |
|
636 |
|
$form->setBloc('co_fin_lls_nb','D', _("Repartition du nombre total de logement crees par type de financement :"),"col_12"); |
637 |
|
$form->setBloc('co_fin_lls_nb','D',"", "alignForm"); |
638 |
|
$form->setBloc('co_fin_autr_nb','F',"", ""); |
639 |
|
|
640 |
|
$form->setBloc('co_fin_autr_desc','DF',"", "alignFormSpec group"); |
641 |
|
$form->setBloc('co_mais_contrat_ind','DF',"", "alignFormSpec group"); |
642 |
|
$form->setBloc('co_mais_contrat_ind','F'); |
643 |
|
|
644 |
|
$form->setBloc('co_uti_pers','D',_("Mode d'utilisation principale des logements :"), "col_12"); |
645 |
|
$form->setBloc('co_uti_pers','D', "", "alignForm"); |
646 |
|
$form->setBloc('co_uti_loc','F',"", ""); |
647 |
|
$form->setBloc('co_uti_loc','F',"", ""); |
648 |
|
|
649 |
|
$form->setBloc('co_uti_princ','D',_("S’il s’agit d’une occupation personnelle, veuillez preciser :"), "col_12"); |
650 |
|
$form->setBloc('co_uti_princ','D',"", "alignForm"); |
651 |
|
$form->setBloc('co_uti_secon','F',"", ""); |
652 |
|
$form->setBloc('co_uti_secon','F',"", "group"); |
653 |
|
|
654 |
|
$form->setBloc('co_resid_agees','D',_("Si le projet est un foyer ou une residence, a quel titre :"), "col_12 alignForm"); |
655 |
|
$form->setBloc('co_resid_agees','D',"", "alignForm"); |
656 |
|
$form->setBloc('co_resid_hand','F',"", ""); |
657 |
|
$form->setBloc('co_resid_hand','F',"", "group"); |
658 |
|
|
659 |
|
$form->setBloc('co_resid_autr','DF',"", "group alignFormSpec"); |
660 |
|
$form->setBloc('co_resid_autr_desc','DF',"", "group"); |
661 |
|
$form->setBloc('co_foyer_chamb_nb','DF',"", "group alignFormSpec"); |
662 |
|
|
663 |
|
$form->setBloc('co_log_1p_nb','D',_("Repartition du nombre de logements crees selon le nombre de pieces :"), "col_12"); |
664 |
|
$form->setBloc('co_log_1p_nb','D', "", "alignForm"); |
665 |
|
$form->setBloc('co_log_6p_nb','F',"", "group"); |
666 |
|
$form->setBloc('co_log_6p_nb','F',"", "group"); |
667 |
|
|
668 |
|
$form->setBloc('co_bat_niv_nb','DF',"", "alignFormSpec"); |
669 |
|
|
670 |
|
$form->setBloc('co_trx_exten','D',_("Indiquez si vos travaux comprennent notamment :"), "col_12"); |
671 |
|
$form->setBloc('co_trx_exten','D',"", "alignForm"); |
672 |
|
$form->setBloc('co_trx_nivsup','F',"", "group"); |
673 |
|
$form->setBloc('co_trx_nivsup','F',"", "group"); |
674 |
|
|
675 |
|
$form->setFieldset('co_trx_nivsup','F',''); |
676 |
|
$form->setFieldset('tab_surface','D' |
677 |
|
,_("Destinations et surfaces des constructions"), "startClosed"); |
678 |
|
$form->setBloc('tab_surface','D', "","col_12 group"); |
679 |
|
$form->setBloc('tab_surface','F'); |
680 |
|
$form->setBloc('co_sp_transport','D', _("Destination des constructions futures en cas de realisation au benefice d'un service public ou d'interet collectif :"),"col_12"); |
681 |
|
$form->setBloc('co_sp_transport','D', "","alignForm"); |
682 |
|
$form->setBloc('co_sp_culture','F', "",""); |
683 |
|
$form->setBloc('co_sp_culture','F', "",""); |
684 |
|
|
685 |
|
$form->setFieldset('co_sp_culture','F',''); |
686 |
|
$form->setFieldset('co_demont_periode','D' |
687 |
|
,_("Divers construction"), "startClosed"); |
688 |
|
|
689 |
|
$form->setBloc('co_demont_periode','DF', _("Construction periodiquement demontee et re-installee :"),"col_12 group"); |
690 |
|
|
691 |
|
$form->setBloc('co_statio_avt_nb','D', _("Nombre de places de stationnement"),"col_12"); |
692 |
|
$form->setBloc('co_statio_avt_nb','D', "","alignForm"); |
693 |
|
$form->setBloc('co_statio_apr_nb','F', "",""); |
694 |
|
$form->setBloc('co_statio_apr_nb','F', "",""); |
695 |
|
|
696 |
|
$form->setBloc('co_statio_adr','D', _("Places de stationnement affectees au projet, amenagees ou reservees en dehors du terrain sur lequel est situe le projet"),"col_12"); |
697 |
|
$form->setBloc('co_statio_adr','DF', "","group"); |
698 |
|
|
699 |
|
$form->setBloc('co_statio_place_nb','D', "","col_12"); |
700 |
|
$form->setBloc('co_statio_place_nb','D', "","alignForm"); |
701 |
|
$form->setBloc('co_statio_tot_shob','F', "",""); |
702 |
|
$form->setBloc('co_statio_tot_shob','F', "",""); |
703 |
|
$form->setBloc('co_statio_tot_shob','F'); |
704 |
|
$form->setBloc('co_statio_comm_cin_surf','D', _("Pour les commerces et cinemas :"),"col_12 alignFormSpec"); |
705 |
|
$form->setBloc('co_perf_energ','F',"", ""); |
706 |
|
|
707 |
// bloc 5.2 |
$form->setFieldset('co_perf_energ','F',''); |
708 |
$form->setBloc('co_cstr_nouv','D',_("Nature du projet"),"col_12"); |
$form->setBloc('co_perf_energ','F'); |
|
|
|
|
$form->setBloc('co_elec_tension','F'); |
|
|
|
|
|
// bloc 5.3 |
|
|
$form->setBloc('co_tot_log_nb','D',_("Informations complementaires"),"col_12"); |
|
|
|
|
|
$form->setBloc('co_trx_nivsup','F'); |
|
|
|
|
|
// bloc 5.4 |
|
|
$form->setBloc('co_demont_period','D',_("Construction periodiquement |
|
|
demontee et re-installee"),"col_12"); |
|
|
|
|
|
$form->setBloc('co_demont_period','F'); |
|
|
|
|
|
// bloc 5.5 |
|
|
$form->setBloc('tab_surface','D',_("Destination des constructions |
|
|
et tableau des surfaces"),"col_12"); |
|
|
|
|
|
$form->setBloc('tab_surface','F'); |
|
|
|
|
|
// bloc 5.6 |
|
|
$form->setBloc('co_sp_transport','D',_("Destination des constructions |
|
|
futures en cas de realisation au benefice d'un |
|
|
service public ou d'interet collectif"),"col_12"); |
|
|
|
|
|
$form->setBloc('co_sp_culture','F'); |
|
709 |
|
|
710 |
// bloc 5.7 |
$form->setFieldset('co_perf_energ','F',''); |
|
$form->setBloc('co_statio_avt_nb','D',_("Stationnement"),"col_12"); |
|
|
|
|
|
$form->setBloc('co_statio_comm_cin_surf','F'); |
|
|
|
|
|
$form->setFieldset('co_statio_apr_surf','F',''); |
|
711 |
|
|
712 |
$form->setBloc('co_statio_apr_surf','F'); |
$form->setBloc('co_perf_energ','F'); |
713 |
|
// Fin construire |
714 |
|
|
|
// Description de modification |
|
|
$form->setBloc('mod_desc','D',"","col_12"); |
|
|
$form->setFieldset('mod_desc','D' |
|
|
,_("Objet de la modification")); |
|
|
$form->setFieldset('mod_desc','F',''); |
|
|
$form->setBloc('mod_desc','F'); |
|
|
|
|
715 |
/*Fieldset n°6 Projet necessitant demolitions */ |
/*Fieldset n°6 Projet necessitant demolitions */ |
716 |
$form->setBloc('dm_constr_dates','D',"","col_12"); |
$form->setBloc('dm_constr_dates','D',"","col_12"); |
717 |
$form->setFieldset('dm_constr_dates','D' |
$form->setFieldset('dm_constr_dates','D' |
718 |
,_("Projet necessitant demolitions")); |
,_("Demolir"), "startClosed"); |
719 |
|
$form->setBloc('dm_constr_dates','DF', "","group"); |
720 |
$form->setBloc('dm_constr_dates','D',"","col_12"); |
$form->setBloc('dm_total','D', "","alignFormSpec"); |
721 |
|
$form->setBloc('dm_partiel','F'); |
722 |
$form->setBloc('dm_tot_log_nb','F'); |
$form->setBloc('dm_projet_desc','DF', "","group"); |
723 |
|
$form->setBloc('dm_tot_log_nb','DF', "","alignFormSpec"); |
724 |
$form->setFieldset('dm_tot_log_nb','F',''); |
$form->setFieldset('dm_tot_log_nb','F',''); |
725 |
|
|
726 |
$form->setBloc('dm_tot_log_nb','F'); |
$form->setBloc('dm_tot_log_nb','F'); |
727 |
|
|
728 |
$form->setBloc('tax_surf_tot','D',_("Declaration des elements necessaires au calcul des impositions"),"col_12"); |
/*Fieldset n°4 Ouverture de chantier */ |
729 |
$form->setBloc('tax_surf_tot','D',"","col_12"); |
$form->setBloc('doc_date','D',"","col_12"); |
730 |
$form->setFieldset('tax_surf_tot','D' |
$form->setFieldset('doc_date','D' |
731 |
,_("Renseignement")); |
,_("Ouverture de chantier"), "startClosed"); |
732 |
|
$form->setBloc('doc_date','DF', "","alignFormSpec-type-date"); |
733 |
$form->setBloc('tax_surf_tot','D',"","col_12"); |
$form->setBloc('doc_tot_trav','D', "","alignFormSpec"); |
734 |
|
$form->setBloc('doc_tranche_trav','F'); |
735 |
$form->setBloc('tax_dest_loc_tr','F'); |
$form->setBloc('doc_tranche_trav_desc','DF', "","group"); |
736 |
|
$form->setBloc('doc_surf','D', "","alignFormSpec"); |
737 |
$form->setBloc('tab_tax_su_princ','D',_("Locaux a usage d'habitation principale"),"col_12"); |
$form->setBloc('doc_nb_log_autre','F', "","group"); |
738 |
$form->setBloc('tab_tax_su_princ','F'); |
$form->setFieldset('doc_nb_log_autre','F',''); |
739 |
|
$form->setBloc('doc_nb_log_autre','F'); |
740 |
|
|
741 |
$form->setBloc('tab_tax_su_heber','D',_("Locaux a usage d'hebergement"),"col_12"); |
/*Fieldset n°4 Achèvement des travaux */ |
742 |
$form->setBloc('tab_tax_su_heber','F'); |
$form->setBloc('daact_date','D',"","col_12"); |
743 |
|
$form->setFieldset('daact_date','D' |
744 |
|
,_("Achevement des travaux") , "startClosed"); |
745 |
|
|
746 |
|
$form->setBloc('daact_date','D', "","alignFormSpec-type-date"); |
747 |
|
$form->setBloc('daact_date_chgmt_dest','F'); |
748 |
|
|
749 |
|
$form->setBloc('daact_tot_trav','D', "","alignFormSpec"); |
750 |
|
$form->setBloc('daact_tranche_trav','F'); |
751 |
|
|
752 |
|
$form->setBloc('daact_tranche_trav_desc','DF', "","group"); |
753 |
|
|
754 |
|
$form->setBloc('daact_surf','D', "","alignFormSpec"); |
755 |
|
$form->setBloc('daact_nb_log_autre','F', "","group"); |
756 |
|
$form->setFieldset('daact_nb_log_autre','F',''); |
757 |
|
$form->setBloc('daact_nb_log_autre','F'); |
758 |
|
|
759 |
$form->setBloc('tab_tax_su_secon','D',_("Locaux a usage d'habitation secondaire"),"col_12"); |
$form->setBloc('code_cnil','D',"","col_12"); |
760 |
$form->setBloc('tab_tax_su_secon','F'); |
$form->setBloc('code_cnil','DF', "","alignFormSpec"); |
761 |
|
$form->setBloc('code_cnil','F'); |
762 |
|
|
763 |
$form->setBloc('tab_tax_su_tot','D',_("Total de logement"),"col_12"); |
$form->setBloc('tax_surf_tot','D',"","col_12"); |
764 |
$form->setBloc('tab_tax_su_tot','F'); |
$form->setFieldset('tax_surf_tot','D' |
765 |
|
,_("Declaration des elements necessaires au calcul des impositions"), "startClosed"); |
766 |
|
|
767 |
$form->setBloc('tax_ext_pret','D',"","col_12"); |
$form->setBloc('tax_surf_tot','D', _("Renseignement"),"col_12"); |
768 |
|
$form->setBloc('tax_surf_tot','D', "", "alignFormSpec"); |
769 |
|
$form->setBloc('tax_surf_suppr_mod','F', "",""); |
770 |
|
$form->setBloc('tax_surf_suppr_mod','F', "",""); |
771 |
|
|
772 |
|
$form->setBloc('tab_tax_su_princ','D',_("Creation de locaux destines a l’habitation :"),"col_12"); |
773 |
|
$form->setBloc('tab_tax_su_tot','F', "",""); |
774 |
|
|
775 |
|
$form->setBloc('tax_ext_pret','DF', "","alignFormSpec"); |
776 |
|
$form->setBloc('tax_ext_desc','DF', "","group"); |
777 |
|
$form->setBloc('tax_surf_tax_exist_cons','D', "","alignFormSpec"); |
778 |
$form->setBloc('tax_log_exist_nb','F'); |
$form->setBloc('tax_log_exist_nb','F'); |
779 |
|
|
780 |
$form->setBloc('tax_comm_nb','D',_("Creation ou extension de locaux non destines a l'habitation"),"col_12"); |
$form->setBloc('tax_comm_nb','D', _("Creation ou extension de locaux non destines a l'habitation :"),"col_12"); |
781 |
$form->setBloc('tab_tax_su_non_habit_surf','F'); |
$form->setBloc('tax_comm_nb','DF', "","col_12 alignFormSpec"); |
782 |
|
$form->setBloc('tax_log_exist_nb','DF'); |
783 |
$form->setBloc('tab_tax_am','D',_("Autres elements soumis a la taxe d'amenagement"),"col_12"); |
$form->setBloc('tax_log_exist_nb','F'); |
|
$form->setBloc('tab_tax_am','F'); |
|
784 |
|
|
785 |
$form->setBloc('tax_trx_presc_ppr','D',_("Cas particuliers"),"col_12"); |
$form->setBloc('tax_trx_presc_ppr','D', _("Cas particuliers"),"col_12 alignFormSpec"); |
786 |
$form->setBloc('tax_monu_hist','F'); |
$form->setBloc('tax_monu_hist','F'); |
787 |
|
|
788 |
$form->setFieldset('tax_monu_hist','F',''); |
$form->setBloc('vsd_surf_planch_smd','D', _("Versement pour sous-densite (VSD)"),"col_12"); |
789 |
|
$form->setBloc('vsd_surf_planch_smd','D', "","alignFormSpec"); |
790 |
$form->setBloc('tax_monu_hist','F'); |
$form->setBloc('vsd_const_sxist_non_dem_surf','F'); |
791 |
|
|
792 |
$form->setBloc('vsd_surf_planch_smd','D',"","col_12"); |
$form->setBloc('vsd_rescr_fisc','DF',"", "alignFormSpec-type-date"); |
|
$form->setFieldset('vsd_surf_planch_smd','D' |
|
|
,_("Autres renseignements")); |
|
|
|
|
|
$form->setBloc('vsd_surf_planch_smd','D',_("Versement pour sous-densite (VSD)"),"col_12"); |
|
793 |
$form->setBloc('vsd_rescr_fisc','F'); |
$form->setBloc('vsd_rescr_fisc','F'); |
794 |
|
|
795 |
$form->setBloc('pld_val_terr','D',_("Plafond legal de densite (PLD)"),"col_12"); |
$form->setBloc('pld_val_terr','D', _("Plafond legal de densite (PLD)"),"col_12 alignFormSpec"); |
796 |
$form->setBloc('pld_const_exist_dem_surf','F'); |
$form->setBloc('pld_const_exist_dem_surf','F'); |
797 |
|
|
798 |
$form->setFieldset('pld_const_exist_dem_surf','F',''); |
$form->setFieldset('pld_const_exist_dem_surf','F',''); |
799 |
|
|
800 |
$form->setBloc('pld_const_exist_dem_surf','F'); |
$form->setBloc('pld_const_exist_dem_surf','F'); |
|
|
|
|
$form->setBloc('pld_const_exist_dem_surf','F'); |
|
801 |
} |
} |
802 |
|
|
803 |
|
/** |
804 |
|
* Surcharge de la méthode setOnChange |
805 |
|
*/ |
806 |
|
function setOnchange(&$form,$maj){ |
807 |
|
parent::setOnchange($form,$maj); |
808 |
|
|
809 |
|
$form->setOnchange("co_tot_ind_nb","sommeChampsCerfa('co_tot_log_nb',['co_tot_ind_nb','co_tot_coll_nb']);"); |
810 |
|
$form->setOnchange("co_tot_coll_nb","sommeChampsCerfa('co_tot_log_nb',['co_tot_ind_nb','co_tot_coll_nb']);"); |
811 |
|
|
812 |
|
$form->setOnchange("doc_nb_log_indiv","sommeChampsCerfa('doc_nb_log',['doc_nb_log_indiv','doc_nb_log_coll']);"); |
813 |
|
$form->setOnchange("doc_nb_log_coll","sommeChampsCerfa('doc_nb_log',['doc_nb_log_indiv','doc_nb_log_coll']);"); |
814 |
|
|
815 |
|
$form->setOnchange("su_avt_shon1","calculSurfaceTotal();"); |
816 |
|
$form->setOnchange("su_avt_shon2","calculSurfaceTotal();"); |
817 |
|
$form->setOnchange("su_avt_shon3","calculSurfaceTotal();"); |
818 |
|
$form->setOnchange("su_avt_shon4","calculSurfaceTotal();"); |
819 |
|
$form->setOnchange("su_avt_shon5","calculSurfaceTotal();"); |
820 |
|
$form->setOnchange("su_avt_shon6","calculSurfaceTotal();"); |
821 |
|
$form->setOnchange("su_avt_shon7","calculSurfaceTotal();"); |
822 |
|
$form->setOnchange("su_avt_shon8","calculSurfaceTotal();"); |
823 |
|
$form->setOnchange("su_avt_shon9","calculSurfaceTotal();"); |
824 |
|
$form->setOnchange("su_cstr_shon1","calculSurfaceTotal();"); |
825 |
|
$form->setOnchange("su_cstr_shon2","calculSurfaceTotal();"); |
826 |
|
$form->setOnchange("su_cstr_shon3","calculSurfaceTotal();"); |
827 |
|
$form->setOnchange("su_cstr_shon4","calculSurfaceTotal();"); |
828 |
|
$form->setOnchange("su_cstr_shon5","calculSurfaceTotal();"); |
829 |
|
$form->setOnchange("su_cstr_shon6","calculSurfaceTotal();"); |
830 |
|
$form->setOnchange("su_cstr_shon7","calculSurfaceTotal();"); |
831 |
|
$form->setOnchange("su_cstr_shon8","calculSurfaceTotal();"); |
832 |
|
$form->setOnchange("su_cstr_shon9","calculSurfaceTotal();"); |
833 |
|
$form->setOnchange("su_trsf_shon1","calculSurfaceTotal();"); |
834 |
|
$form->setOnchange("su_trsf_shon2","calculSurfaceTotal();"); |
835 |
|
$form->setOnchange("su_trsf_shon3","calculSurfaceTotal();"); |
836 |
|
$form->setOnchange("su_trsf_shon4","calculSurfaceTotal();"); |
837 |
|
$form->setOnchange("su_trsf_shon5","calculSurfaceTotal();"); |
838 |
|
$form->setOnchange("su_trsf_shon6","calculSurfaceTotal();"); |
839 |
|
$form->setOnchange("su_trsf_shon7","calculSurfaceTotal();"); |
840 |
|
$form->setOnchange("su_trsf_shon8","calculSurfaceTotal();"); |
841 |
|
$form->setOnchange("su_trsf_shon9","calculSurfaceTotal();"); |
842 |
|
$form->setOnchange("su_chge_shon1","calculSurfaceTotal();"); |
843 |
|
$form->setOnchange("su_chge_shon2","calculSurfaceTotal();"); |
844 |
|
$form->setOnchange("su_chge_shon3","calculSurfaceTotal();"); |
845 |
|
$form->setOnchange("su_chge_shon4","calculSurfaceTotal();"); |
846 |
|
$form->setOnchange("su_chge_shon5","calculSurfaceTotal();"); |
847 |
|
$form->setOnchange("su_chge_shon6","calculSurfaceTotal();"); |
848 |
|
$form->setOnchange("su_chge_shon7","calculSurfaceTotal();"); |
849 |
|
$form->setOnchange("su_chge_shon8","calculSurfaceTotal();"); |
850 |
|
$form->setOnchange("su_chge_shon9","calculSurfaceTotal();"); |
851 |
|
$form->setOnchange("su_demo_shon1","calculSurfaceTotal();"); |
852 |
|
$form->setOnchange("su_demo_shon2","calculSurfaceTotal();"); |
853 |
|
$form->setOnchange("su_demo_shon3","calculSurfaceTotal();"); |
854 |
|
$form->setOnchange("su_demo_shon4","calculSurfaceTotal();"); |
855 |
|
$form->setOnchange("su_demo_shon5","calculSurfaceTotal();"); |
856 |
|
$form->setOnchange("su_demo_shon6","calculSurfaceTotal();"); |
857 |
|
$form->setOnchange("su_demo_shon7","calculSurfaceTotal();"); |
858 |
|
$form->setOnchange("su_demo_shon8","calculSurfaceTotal();"); |
859 |
|
$form->setOnchange("su_demo_shon9","calculSurfaceTotal();"); |
860 |
|
$form->setOnchange("su_sup_shon1","calculSurfaceTotal();"); |
861 |
|
$form->setOnchange("su_sup_shon2","calculSurfaceTotal();"); |
862 |
|
$form->setOnchange("su_sup_shon3","calculSurfaceTotal();"); |
863 |
|
$form->setOnchange("su_sup_shon4","calculSurfaceTotal();"); |
864 |
|
$form->setOnchange("su_sup_shon5","calculSurfaceTotal();"); |
865 |
|
$form->setOnchange("su_sup_shon6","calculSurfaceTotal();"); |
866 |
|
$form->setOnchange("su_sup_shon7","calculSurfaceTotal();"); |
867 |
|
$form->setOnchange("su_sup_shon8","calculSurfaceTotal();"); |
868 |
|
$form->setOnchange("su_sup_shon9","calculSurfaceTotal();"); |
869 |
|
$form->setOnchange("su_tot_shon1","calculSurfaceTotal();"); |
870 |
|
$form->setOnchange("su_tot_shon2","calculSurfaceTotal();"); |
871 |
|
$form->setOnchange("su_tot_shon3","calculSurfaceTotal();"); |
872 |
|
$form->setOnchange("su_tot_shon4","calculSurfaceTotal();"); |
873 |
|
$form->setOnchange("su_tot_shon5","calculSurfaceTotal();"); |
874 |
|
$form->setOnchange("su_tot_shon6","calculSurfaceTotal();"); |
875 |
|
$form->setOnchange("su_tot_shon7","calculSurfaceTotal();"); |
876 |
|
$form->setOnchange("su_tot_shon8","calculSurfaceTotal();"); |
877 |
|
$form->setOnchange("su_tot_shon9","calculSurfaceTotal();"); |
878 |
|
|
879 |
|
} |
880 |
|
|
881 |
|
|
882 |
/** |
/** |
911 |
} |
} |
912 |
} |
} |
913 |
} |
} |
914 |
|
|
915 |
|
/** |
916 |
|
* Cette variable permet de stocker le résultat de la méthode |
917 |
|
* getDivisionFromDossier() afin de ne pas effectuer le recalcul à chacun de |
918 |
|
* ces appels. |
919 |
|
* @var string Code de la division du dossier en cours |
920 |
|
*/ |
921 |
|
var $_division_from_dossier = NULL; |
922 |
|
|
923 |
|
/** |
924 |
|
* Cette méthode permet de récupérer le code de division correspondant |
925 |
|
* au dossier sur lequel on se trouve. |
926 |
|
* |
927 |
|
* @return string Code de la division du dossier en cours |
928 |
|
*/ |
929 |
|
function getDivisionFromDossier() { |
930 |
|
|
931 |
|
// Cette méthode peut être appelée plusieurs fois lors d'une requête. |
932 |
|
// Pour éviter de refaire le traitement de recherche de la division |
933 |
|
// alors on vérifie si nous ne l'avons pas déjà calculé. |
934 |
|
if ($this->_division_from_dossier != NULL) { |
935 |
|
// Logger |
936 |
|
$this->addToLog("getDivisionFromDossier(): retour de la valeur déjà calculée - '".$this->_division_from_dossier."'", EXTRA_VERBOSE_MODE); |
937 |
|
// On retourne la valeur déjà calculée |
938 |
|
return $this->_division_from_dossier; |
939 |
|
} |
940 |
|
|
941 |
|
// Par défaut, on définit la valeur du dossier à NULL |
942 |
|
$dossier = NULL; |
943 |
|
// Test sur le mode et le contexte du formulaire |
944 |
|
if ($this->getParameter("maj") == 0 |
945 |
|
&& ($this->getParameter("retourformulaire") == "dossier" |
946 |
|
|| $this->getParameter("retourformulaire") == "dossier_instruction" |
947 |
|
|| $this->getParameter("retourformulaire") == "dossier_instruction_mes_encours" |
948 |
|
|| $this->getParameter("retourformulaire") == "dossier_instruction_tous_encours" |
949 |
|
|| $this->getParameter("retourformulaire") == "dossier_instruction_mes_clotures" |
950 |
|
|| $this->getParameter("retourformulaire") == "dossier_instruction_tous_clotures")) { |
951 |
|
// Si on se trouve en mode AJOUT (seul mode où l'enregistrement |
952 |
|
// n'existe pas en base de données) ET que nous nous trouvons |
953 |
|
// dans le contexte d'un dossier d'instruction alors on récupère |
954 |
|
// le numéro de dossier depuis le paramètre 'idxformulaire' |
955 |
|
$dossier = $this->getParameter("idxformulaire"); |
956 |
|
} else { |
957 |
|
// Sinon on récupère le numéro de dossier dans le champs dossier de |
958 |
|
// l'enregistrement (en base de données) |
959 |
|
$dossier = $this->getVal("dossier"); |
960 |
|
} |
961 |
|
|
962 |
|
// On appelle la méthode de la classe utils qui renvoi le code de la |
963 |
|
// division d'un dossier, on la stocke pour ne pas refaire le calcul au |
964 |
|
// prochain appel de cette méthode |
965 |
|
$this->_division_from_dossier = $this->f->getDivisionFromDossier($dossier); |
966 |
|
// Logger |
967 |
|
$this->addToLog("getDivisionFromDossier(): retour de la valeur nouvellement calculée - '".$this->_division_from_dossier."'", EXTRA_VERBOSE_MODE); |
968 |
|
// On retourne la valeur retournée |
969 |
|
return $this->_division_from_dossier; |
970 |
|
|
971 |
|
} |
972 |
|
|
973 |
|
/** |
974 |
|
* Retourne le nom et le prénom de l'architecte qui a l'identifiant $id |
975 |
|
* @param integer $id |
976 |
|
* @param object $db |
977 |
|
* @return string |
978 |
|
*/ |
979 |
|
function getPrenomNomArchitecte($id){ |
980 |
|
|
981 |
|
$coordonneesArchitecte = ""; |
982 |
|
if ( $id != '' && is_numeric($id) ){ |
983 |
|
|
984 |
|
$sql = "SELECT |
985 |
|
CONCAT(architecte.prenom, ' ', architecte.nom) |
986 |
|
FROM |
987 |
|
".DB_PREFIXE."architecte |
988 |
|
WHERE |
989 |
|
architecte.architecte = ".$id; |
990 |
|
$coordonneesArchitecte = $this->db->getOne($sql); |
991 |
|
$this->f->addToLog("setSelect() : db->getOne(\"".$sql."\")", VERBOSE_MODE); |
992 |
|
if ( database::isError($coordonneesArchitecte)){ |
993 |
|
$this->f->addToError("", $coordonneesArchitecte, $coordonneesArchitecte); |
994 |
|
return false; |
995 |
|
} |
996 |
|
} |
997 |
|
return $coordonneesArchitecte; |
998 |
|
} |
999 |
|
|
1000 |
}// fin classe |
}// fin classe |
1001 |
?> |
?> |