320 |
* @param integer $dossier_instruction_type |
* @param integer $dossier_instruction_type |
321 |
* @return int |
* @return int |
322 |
*/ |
*/ |
323 |
public function getNumeroVersionDossierInstructionType($dossier_autorisation, $dossier_instruction_type, $numero_version){ |
public function getNumeroVersionDossierInstructionType($dossier_autorisation, $dossier_instruction_type, $numero_version, $increment = true){ |
324 |
|
|
325 |
$numeroVersionDossierInstructionType = $numero_version; |
$numeroVersionDossierInstructionType = $numero_version; |
326 |
|
|
371 |
$this->f->addToError("", $numeroVersionDossierInstructionType, $numeroVersionDossierInstructionType); |
$this->f->addToError("", $numeroVersionDossierInstructionType, $numeroVersionDossierInstructionType); |
372 |
return false; |
return false; |
373 |
} |
} |
374 |
|
|
375 |
|
// |
376 |
|
if ($increment === true) { |
377 |
|
$numeroVersionDossierInstructionType = ++$numeroVersionDossierInstructionType; |
378 |
|
} |
379 |
//On compléte par des 0 à gauche |
//On compléte par des 0 à gauche |
380 |
$numeroVersionDossierInstructionType = str_pad(++$numeroVersionDossierInstructionType, 2, "0", STR_PAD_LEFT); |
$numeroVersionDossierInstructionType = str_pad($numeroVersionDossierInstructionType, 2, "0", STR_PAD_LEFT); |
381 |
|
|
382 |
return $numeroVersionDossierInstructionType; |
return $numeroVersionDossierInstructionType; |
383 |
} |
} |
482 |
$form->setType('parcelle_lot_archive','hidden'); |
$form->setType('parcelle_lot_archive','hidden'); |
483 |
|
|
484 |
$form->setType('geom1', 'hidden'); |
$form->setType('geom1', 'hidden'); |
485 |
$form->setType('geom', 'geom'); |
$form->setType('geom', 'hiddenstatic'); |
486 |
$form->setType('servitude', 'hiddenstatic'); |
$form->setType('servitude', 'hiddenstatic'); |
487 |
|
|
488 |
|
|
578 |
$form->setType('parcelle_archive','hidden'); |
$form->setType('parcelle_archive','hidden'); |
579 |
$form->setType('parcelle_lot_archive','hidden'); |
$form->setType('parcelle_lot_archive','hidden'); |
580 |
$form->setType('geom1','hidden'); |
$form->setType('geom1','hidden'); |
581 |
$form->setType('geom','hidden'); |
$form->setType('geom','hiddenstatic'); |
582 |
$form->setType('a_qualifier', 'checkboxstatic'); |
$form->setType('a_qualifier', 'checkboxstatic'); |
583 |
$form->setType('terrain_references_cadastrales','referencescadastralesstatic'); // PC |
$form->setType('terrain_references_cadastrales','referencescadastralesstatic'); // PC |
584 |
$form->setType('parcelle', 'hidden'); |
$form->setType('parcelle', 'hidden'); |
637 |
|
|
638 |
function setVal(&$form,$maj,$validation){ |
function setVal(&$form,$maj,$validation){ |
639 |
$this->maj=$maj; |
$this->maj=$maj; |
640 |
|
|
641 |
|
if($this->getVal('geom') != "") { |
642 |
|
$form->setVal('geom', |
643 |
|
"<a id='action-form-localiser'". |
644 |
|
" target='_blank' href='../app/redirect_plan_sig.php?idx=".$this->getVal("dossier")."'>". |
645 |
|
"<span class='om-icon om-icon-16 om-icon-fix sig-16' title='Localiser'>Localiser</span> ". |
646 |
|
$this->getVal('geom'). |
647 |
|
" </a>"); |
648 |
|
} else { |
649 |
|
$form->setVal('geom', ''); |
650 |
|
} |
651 |
if ($validation==0) { |
if ($validation==0) { |
652 |
if ($maj == 0){ |
if ($maj == 0){ |
653 |
//$dossier_cp = $this->f->collectivite["cp"]; |
//$dossier_cp = $this->f->collectivite["cp"]; |
736 |
} |
} |
737 |
|
|
738 |
function setLib(&$form,$maj) { |
function setLib(&$form,$maj) { |
739 |
parent::setLib($form,$maj); |
parent::setLib($form,$maj); |
740 |
$form->setLib('geom',''); |
$form->setLib('geom',_('centroide')); |
741 |
$form->setLib('date_limite',_("date limite d'instruction")); |
$form->setLib('date_limite',_("date limite d'instruction")); |
742 |
$form->setLib('delai',_("delai d'instruction")); |
$form->setLib('delai',_("delai d'instruction")); |
743 |
$form->setLib('accord_tacite',_("decision tacite")); |
$form->setLib('accord_tacite',_("decision tacite")); |
744 |
} |
} |
745 |
|
|
|
function setGroupe(&$form,$maj){ |
|
|
|
|
|
// localisation |
|
|
$form->setGroupe('parcelle','D'); |
|
|
$form->setGroupe('pos','G'); |
|
|
if($maj==1){ |
|
|
$form->setGroupe('sig','G'); |
|
|
$form->setGroupe('geom','F'); |
|
|
}else { |
|
|
$form->setGroupe('sig','F'); |
|
|
} |
|
|
if($maj==1){ |
|
|
$form->setGroupe('sig','G'); |
|
|
$form->setGroupe('geom','F'); |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
746 |
function setOnchange(&$form,$maj){ |
function setOnchange(&$form,$maj){ |
747 |
parent::setOnchange($form,$maj); |
parent::setOnchange($form,$maj); |
748 |
// mise en majuscule |
// mise en majuscule |
1704 |
* @param array $val Valeurs de l'objet |
* @param array $val Valeurs de l'objet |
1705 |
* @param intger $maj Mode du formulaire |
* @param intger $maj Mode du formulaire |
1706 |
*/ |
*/ |
1707 |
function setEnt($ent, $val = array(), $maj) { |
function getFormTitle($ent) { |
1708 |
|
|
1709 |
// Fil d'Ariane |
// Fil d'Ariane |
1710 |
$ent = _("instruction")." -> "._("dossiers d'instruction"); |
$ent = _("instruction")." -> "._("dossiers d'instruction"); |
1711 |
|
|
1712 |
// Si différent de l'ajout |
// Si différent de l'ajout |
1713 |
if($maj != 0) { |
if($this->getParameter("maj") != 0) { |
1714 |
// Si le champ dossier_libelle existe |
// Si le champ dossier_libelle existe |
1715 |
if (isset($val["dossier_libelle"]) && trim($val["dossier_libelle"]) != '') { |
if (trim($this->getVal("dossier_libelle")) != '') { |
1716 |
$ent .= " -> ".strtoupper($val["dossier_libelle"]); |
$ent .= " -> ".strtoupper($this->getVal("dossier_libelle")); |
1717 |
} |
} |
1718 |
// Si le champ dossier existe |
// Si le champ dossier existe |
1719 |
if (isset($val["dossier"]) && trim($val["dossier"]) != '') { |
if (trim($this->getVal("dossier")) != '') { |
1720 |
$demandeur = $this->get_demandeur($val["dossier"]); |
$demandeur = $this->get_demandeur($this->getVal("dossier")); |
1721 |
// Si le demandeur existe |
// Si le demandeur existe |
1722 |
if (isset($demandeur) && trim($demandeur) != '') { |
if (isset($demandeur) && trim($demandeur) != '') { |
1723 |
$ent .= " ".strtoupper($demandeur); |
$ent .= " ".strtoupper($demandeur); |
1726 |
} |
} |
1727 |
|
|
1728 |
// Change le fil d'Ariane |
// Change le fil d'Ariane |
1729 |
$this->ent .= $ent; |
return $ent; |
1730 |
} |
} |
1731 |
|
|
1732 |
/** |
/** |