478 |
$form->setType('parcelle_lot_lotissement','hidden'); // PC |
$form->setType('parcelle_lot_lotissement','hidden'); // PC |
479 |
$form->setType('version','hidden'); // PC |
$form->setType('version','hidden'); // PC |
480 |
$form->setType('incompletude','hidden'); |
$form->setType('incompletude','hidden'); |
481 |
|
$form->setType('incomplet_notifie','hidden'); |
482 |
$form->setType('etat_pendant_incompletude','hidden'); |
$form->setType('etat_pendant_incompletude','hidden'); |
483 |
$form->setType('duree_validite','hidden'); |
$form->setType('duree_validite','hidden'); |
484 |
$form->setType('description','hidden'); |
$form->setType('description','hidden'); |
496 |
$form->setType('parcelle_lot_archive','hidden'); |
$form->setType('parcelle_lot_archive','hidden'); |
497 |
$form->setType('geom1', 'hidden'); |
$form->setType('geom1', 'hidden'); |
498 |
$form->setType('geom', 'hiddenstatic'); |
$form->setType('geom', 'hiddenstatic'); |
499 |
// $form->setType('servitude', 'hiddenstatic'); |
// $form->setType('servitude', 'hiddenstatic'); |
|
|
|
500 |
$form->setType('autorite_competente', 'selecthiddenstatic'); |
$form->setType('autorite_competente', 'selecthiddenstatic'); |
501 |
|
|
502 |
// Si l'état du dossier est incomplet |
// Si l'état du dossier est incomplet |
503 |
if ($this->is_incomplet_notifie()) { |
if ($this->is_incomplet_notifie()) { |
504 |
// On cache les dates de complétude et de limite d'instruction |
// On cache les dates de complétude et de limite d'instruction |
523 |
$form->setType('terrain','hiddenstatic'); |
$form->setType('terrain','hiddenstatic'); |
524 |
$form->setType('etat','hiddenstatic'); |
$form->setType('etat','hiddenstatic'); |
525 |
$form->setType('avis_decision','hiddenstatic'); |
$form->setType('avis_decision','hiddenstatic'); |
526 |
$form->setType('delai_incompletude','hiddenstatic'); |
$form->setType('delai_incompletude','hidden'); |
527 |
$form->setType('delai','hiddenstatic'); |
$form->setType('delai','hiddenstatic'); |
528 |
$form->setType('terrain_surface_calcul','hiddenstatic'); |
$form->setType('terrain_surface_calcul','hiddenstatic'); |
529 |
$form->setType('shon_calcul','hiddenstatic'); |
$form->setType('shon_calcul','hiddenstatic'); |
733 |
} |
} |
734 |
|
|
735 |
function setSelect(&$form, $maj,&$db,$debug) { |
function setSelect(&$form, $maj,&$db,$debug) { |
736 |
|
parent::setSelect($form, $maj, $db, $debug); |
737 |
|
|
738 |
//optimisation sur table importante parcelle -> pas d appel methode parent |
//optimisation sur table importante parcelle -> pas d appel methode parent |
739 |
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) |
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) |
740 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
741 |
|
|
742 |
|
/* |
743 |
|
* Pour chaque init_select d'un select non modifiable on teste |
744 |
|
* si l'on est en mode modifier : si c'est le cas alors on initialise le |
745 |
|
* select en mode consulter (qui n'affiche rien s'il n'y a aucune valeur). |
746 |
|
*/ |
747 |
|
|
748 |
// instructeur |
// instructeur |
749 |
$this->init_select($form, $db, $maj, $debug, "instructeur", |
$this->init_select($form, $db, $maj, $debug, "instructeur", |
750 |
$sql_instructeur, $sql_instructeur_by_id, true); |
$sql_instructeur, $sql_instructeur_by_id, false); |
751 |
|
|
752 |
// etat |
// etat |
753 |
$this->init_select($form, $db, $maj, $debug, "etat", |
if ($maj == 1) { |
754 |
|
$this->init_select($form, $db, 3, $debug, "etat", |
755 |
$sql_etat, $sql_etat_by_id, false); |
$sql_etat, $sql_etat_by_id, false); |
756 |
|
} else { |
757 |
|
$this->init_select($form, $db, $maj, $debug, "etat", |
758 |
|
$sql_etat, $sql_etat_by_id, false); |
759 |
|
} |
760 |
|
|
761 |
// dossier_instruction_type |
// dossier_instruction_type |
762 |
$this->init_select($form, $db, $maj, $debug, "dossier_instruction_type", |
if ($maj == 1) { |
763 |
|
$this->init_select($form, $db, 3, $debug, "dossier_instruction_type", |
764 |
$sql_dossier_instruction_type, $sql_dossier_instruction_type_by_id, false); |
$sql_dossier_instruction_type, $sql_dossier_instruction_type_by_id, false); |
765 |
|
} else { |
766 |
|
$this->init_select($form, $db, $maj, $debug, "dossier_instruction_type", |
767 |
|
$sql_dossier_instruction_type, $sql_dossier_instruction_type_by_id, false); |
768 |
|
} |
769 |
|
|
770 |
// division |
// division |
771 |
$this->init_select($form, $db, $maj, $debug, "division", |
$this->init_select($form, $db, $maj, $debug, "division", |
772 |
$sql_division, $sql_division_by_id, true); |
$sql_division, $sql_division_by_id, false); |
773 |
|
|
774 |
// autorite_competente |
// autorite_competente |
775 |
$this->init_select($form, $db, $maj, $debug, "autorite_competente", |
if ($maj == 1) { |
776 |
|
$this->init_select($form, $db, 3, $debug, "autorite_competente", |
777 |
$sql_autorite_competente, $sql_autorite_competente_by_id, false); |
$sql_autorite_competente, $sql_autorite_competente_by_id, false); |
778 |
|
} else { |
779 |
|
$this->init_select($form, $db, $maj, $debug, "autorite_competente", |
780 |
|
$sql_autorite_competente, $sql_autorite_competente_by_id, false); |
781 |
|
} |
782 |
|
|
783 |
// avis_decision |
// avis_decision |
784 |
$this->init_select($form, $db, $maj, $debug, "avis_decision", |
if ($maj == 1) { |
785 |
|
$this->init_select($form, $db, 3, $debug, "avis_decision", |
786 |
$sql_avis_decision, $sql_avis_decision_by_id, false); |
$sql_avis_decision, $sql_avis_decision_by_id, false); |
787 |
|
} else { |
788 |
|
$this->init_select($form, $db, $maj, $debug, "avis_decision", |
789 |
|
$sql_avis_decision, $sql_avis_decision_by_id, false); |
790 |
|
} |
791 |
|
|
792 |
// evenement_suivant_tacite |
// evenement_suivant_tacite |
793 |
$this->init_select($form, $db, $maj, $debug, "evenement_suivant_tacite", |
if ($maj == 1) { |
794 |
|
$this->init_select($form, $db, 3, $debug, "evenement_suivant_tacite", |
795 |
$sql_evenement_suivant_tacite, $sql_evenement_suivant_tacite_by_id, false); |
$sql_evenement_suivant_tacite, $sql_evenement_suivant_tacite_by_id, false); |
796 |
|
} else { |
797 |
|
$this->init_select($form, $db, $maj, $debug, "evenement_suivant_tacite", |
798 |
|
$sql_evenement_suivant_tacite, $sql_evenement_suivant_tacite_by_id, false); |
799 |
|
} |
800 |
|
|
801 |
// evenement_suivant_tacite_incompletude |
// evenement_suivant_tacite_incompletude |
802 |
$this->init_select($form, $db, $maj, $debug, "evenement_suivant_tacite_incompletude", |
if ($maj == 1) { |
803 |
|
$this->init_select($form, $db, 3, $debug, "evenement_suivant_tacite_incompletude", |
804 |
$sql_evenement_suivant_tacite_incompletude, $sql_evenement_suivant_tacite_incompletude_by_id, false); |
$sql_evenement_suivant_tacite_incompletude, $sql_evenement_suivant_tacite_incompletude_by_id, false); |
805 |
|
} else { |
806 |
|
$this->init_select($form, $db, $maj, $debug, "evenement_suivant_tacite_incompletude", |
807 |
|
$sql_evenement_suivant_tacite_incompletude, $sql_evenement_suivant_tacite_incompletude_by_id, false); |
808 |
|
} |
809 |
|
|
810 |
if($maj<2){ |
if($maj<2){ |
811 |
// parcelle_lot |
// parcelle_lot |
1016 |
* @return boolean true si incomplet notifié |
* @return boolean true si incomplet notifié |
1017 |
*/ |
*/ |
1018 |
function is_incomplet_notifie() { |
function is_incomplet_notifie() { |
1019 |
// Si déjà défini on le retourne |
// Si le dossier est défini en tant qu'incomplet notifie |
1020 |
if($this->is_incomplet_notifie != null) { |
if($this->getVal('incomplet_notifie') == 't' AND |
1021 |
return $this->is_incomplet_notifie; |
$this->getVal('incompletude') == 't') { |
1022 |
} |
return true; |
|
// Si le dossier n'est pas défini en tant qu'incomplet |
|
|
if($this->getVal('incompletude') != 't') { |
|
|
$this->is_incomplet_notifie = false; |
|
|
return $this->is_incomplet_notifie; |
|
|
} |
|
|
// Vérification du retour de notification du dernier evnmt d'incomplétude |
|
|
$sql = "SELECT date_retour_rar |
|
|
FROM ".DB_PREFIXE."instruction WHERE instruction = |
|
|
(SELECT max(instruction) FROM ".DB_PREFIXE."instruction |
|
|
JOIN ".DB_PREFIXE."evenement on instruction.evenement=evenement.evenement |
|
|
WHERE dossier= '".$this->getVal($this->clePrimaire)."' |
|
|
AND evenement.type='incompletude')"; |
|
|
$date_retour_rar = $this->db->getOne($sql); |
|
|
if (database :: isError($date_retour_rar)) { |
|
|
return -1; |
|
|
} |
|
|
// Si une date de retour alors l'incompletude est notifiée. |
|
|
if($date_retour_rar != '') { |
|
|
$this->is_incomplet_notifie = true; |
|
|
} else { |
|
|
$this->is_incomplet_notifie = false; |
|
1023 |
} |
} |
1024 |
return $this->is_incomplet_notifie; |
return false; |
1025 |
} |
} |
1026 |
|
|
1027 |
/* ============================================================= |
/* ============================================================= |