59 |
&& isset($this->f->om_utilisateur["division"]) |
&& isset($this->f->om_utilisateur["division"]) |
60 |
&& $this->f->om_utilisateur["division"] != $this->getDivisionFromDossier()) { |
&& $this->f->om_utilisateur["division"] != $this->getDivisionFromDossier()) { |
61 |
// |
// |
62 |
$this->actions_sup = array(); |
$this->parameters["actions"]["modifier"] = NULL; |
63 |
$this->setParameter("actions", array()); |
|
64 |
|
//Cache le lien du rapport d'instruction, si aucun n'est lié |
65 |
|
if ( $this->getRapportInstruction() == '' ){ |
66 |
|
|
67 |
|
$this->actions_sup['rapport_instruction'] = NULL; |
68 |
|
} |
69 |
|
|
70 |
|
//Cache le lien des données techniques, si aucun n'est lié |
71 |
|
if ( $this->getDonneesTechniques() == '' ){ |
72 |
|
|
73 |
|
$this->actions_sup['donnees_techniques'] = NULL; |
74 |
|
} |
75 |
} |
} |
76 |
|
|
77 |
//Si l'utilisateur est un instructeur et le dossier d'instruction est clôturé, |
//Si l'utilisateur est un instructeur et le dossier d'instruction est clôturé, |
183 |
*/ |
*/ |
184 |
function setValFAjout($val = array()) { |
function setValFAjout($val = array()) { |
185 |
|
|
186 |
/*Récupération de la lettre associé au type de dossier d'instruction*/ |
//Récupération de la lettre associé au type de dossier d'instruction |
187 |
$code = $this->getCode($this->getDossierInstructionType()); |
$code = $this->getCode($this->getDossierInstructionType()); |
188 |
|
|
189 |
/* Récupération de la valeur du suffixe ce dossier_instruction_type */ |
//Récupération de la valeur du suffixe ce dossier_instruction_type |
190 |
$suffixe = $this->getSuffixe($this->getDossierInstructionType()); |
$suffixe = $this->getSuffixe($this->getDossierInstructionType()); |
191 |
|
|
192 |
/*S'il est à TRUE, on récupère le numéro de version du dossier d'autorisation*/ |
//S'il est à TRUE, on récupère le numéro de version du dossier d'autorisation |
193 |
$numeroVersion = ""; |
$numeroVersion = ""; |
194 |
|
$numeroVersionDIT = ""; |
195 |
if ( $suffixe == 't' ){ |
if ( $suffixe == 't' ){ |
196 |
|
|
197 |
|
//Récupération du numéro de version |
198 |
$numeroVersion = $this->getNumeroVersion($val['dossier_autorisation']); |
$numeroVersion = $this->getNumeroVersion($val['dossier_autorisation']); |
199 |
|
|
200 |
/* Incrémentation du numéro de version */ |
//Incrémentation du numéro de version |
201 |
if ( is_numeric($numeroVersion) or $numeroVersion == -1 ){ |
if ( is_numeric($numeroVersion) or $numeroVersion == -1 ){ |
202 |
|
|
203 |
$this->incrementNumeroVersion($val['dossier_autorisation'], ++$numeroVersion); |
$this->incrementNumeroVersion($val['dossier_autorisation'], ++$numeroVersion); |
204 |
} |
} |
205 |
|
//Récupération du numéro de version en fonction du type de dossier d'instruction |
206 |
|
//Si c'est un modificatif ou un transfert, on utilise un numéro du type |
207 |
|
// 01 ou 02, etc. sinon on utilise le numéro de version comme auparavant |
208 |
|
$numeroVersionDossierInstructionType = $this->getNumeroVersionDossierInstructionType($val['dossier_autorisation'], $val['dossier_instruction_type'], $numeroVersion); |
209 |
} |
} |
210 |
|
|
211 |
/*Création du numéro de dossier*/ |
//Création du numéro de dossier |
212 |
$this->valF['dossier'] = $val['dossier_autorisation']."$code$numeroVersion"; |
$this->valF['dossier'] = $val['dossier_autorisation'].$code.$numeroVersionDossierInstructionType; |
213 |
$this->valF['version'] = $numeroVersion; |
$this->valF['version'] = $numeroVersion; |
214 |
|
|
215 |
|
// Identifiant du dossier d'instruction lisible |
216 |
|
// Ex : DP 013055 13 00002P0 |
217 |
|
$this->valF['dossier_libelle'] = $this->get_dossier_autorisation_libelle($val['dossier_autorisation']).$code.$numeroVersionDossierInstructionType; |
218 |
} |
} |
219 |
|
|
220 |
/*Récupère la valeur du suffixe d'un dossier_instruction_type*/ |
/*Récupère la valeur du suffixe d'un dossier_instruction_type*/ |
313 |
die($res->getMessage()."erreur ".$sql); |
die($res->getMessage()."erreur ".$sql); |
314 |
|
|
315 |
} |
} |
316 |
|
|
317 |
|
/** |
318 |
|
* Retourne un numéro de version en fonction du type de dossier d'instruction |
319 |
|
* @param string $dossier_autorisation |
320 |
|
* @param integer $dossier_instruction_type |
321 |
|
* @return int |
322 |
|
*/ |
323 |
|
public function getNumeroVersionDossierInstructionType($dossier_autorisation, $dossier_instruction_type, $numero_version){ |
324 |
|
|
325 |
|
$numeroVersionDossierInstructionType = $numero_version; |
326 |
|
|
327 |
|
//On récupère le code correspondant au type de dossier d'instruction passé |
328 |
|
//en paramètre |
329 |
|
$sql = "SELECT |
330 |
|
code |
331 |
|
FROM |
332 |
|
".DB_PREFIXE."dossier_instruction_type |
333 |
|
WHERE |
334 |
|
dossier_instruction_type = ".$dossier_instruction_type; |
335 |
|
$codeDossierInstructionType = $this->db->getOne($sql); |
336 |
|
$this->f->addToLog("getNumeroVersionDossierInstructionType(): db->getOne(\"".$sql."\")", VERBOSE_MODE); |
337 |
|
if ( database::isError($codeDossierInstructionType)){ |
338 |
|
$this->f->addToError("", $codeDossierInstructionType, $codeDossierInstructionType); |
339 |
|
return false; |
340 |
|
} |
341 |
|
|
342 |
|
|
343 |
|
// Si c'est un dossier d'instruction de type "Initial", code "P", on retourne 0 |
344 |
|
if ( strcmp($codeDossierInstructionType, "P") == 0 ){ |
345 |
|
return 0; |
346 |
|
} |
347 |
|
//Si c'est un modificatif ou transfert on retourne un nombre correspondant au |
348 |
|
//nombre de dossier d'instruction de ce type, rattaché au dossier |
349 |
|
//d'autorisation complété par des 0 à gauche si besoin. Format du retour |
350 |
|
//attendu : 01 ou 02, etc. |
351 |
|
elseif ( strcmp($codeDossierInstructionType, "M") == 0 || |
352 |
|
strcmp($codeDossierInstructionType, "T") == 0 ){ |
353 |
|
|
354 |
|
//On récupère le nombre de dossier d'instruction de ce type rattaché au |
355 |
|
//dossier d'autorisation |
356 |
|
$sql = "SELECT |
357 |
|
count(*) |
358 |
|
FROM |
359 |
|
".DB_PREFIXE."dossier |
360 |
|
LEFT JOIN |
361 |
|
".DB_PREFIXE."dossier_autorisation |
362 |
|
ON |
363 |
|
dossier_autorisation.dossier_autorisation = dossier.dossier_autorisation |
364 |
|
WHERE |
365 |
|
dossier_autorisation.dossier_autorisation = '".$dossier_autorisation."' |
366 |
|
AND |
367 |
|
dossier.dossier_instruction_type = ".$dossier_instruction_type; |
368 |
|
$numeroVersionDossierInstructionType = $this->db->getOne($sql); |
369 |
|
$this->f->addToLog("getNumeroVersionDossierInstructionType(): db->getOne(\"".$sql."\")", VERBOSE_MODE); |
370 |
|
if ( database::isError($numeroVersionDossierInstructionType)){ |
371 |
|
$this->f->addToError("", $numeroVersionDossierInstructionType, $numeroVersionDossierInstructionType); |
372 |
|
return false; |
373 |
|
} |
374 |
|
//On compléte par des 0 à gauche |
375 |
|
$numeroVersionDossierInstructionType = str_pad(++$numeroVersionDossierInstructionType, 2, "0", STR_PAD_LEFT); |
376 |
|
|
377 |
|
return $numeroVersionDossierInstructionType; |
378 |
|
} |
379 |
|
//Sinon on retourne le numéro de version |
380 |
|
else{ |
381 |
|
return $numeroVersionDossierInstructionType; |
382 |
|
} |
383 |
|
} |
384 |
|
/** |
385 |
|
* Retourne le libellé du dossier d'autorisation |
386 |
|
* @param string $dossier_autorisation Identifiant du dossier d'autorisation |
387 |
|
* @return string Libellé dossier d'autorisation |
388 |
|
*/ |
389 |
|
function get_dossier_autorisation_libelle($dossier_autorisation) { |
390 |
|
|
391 |
|
$dossier_autorisation_libelle = ""; |
392 |
|
|
393 |
|
// Requête SQL |
394 |
|
$sql = "SELECT |
395 |
|
dossier_autorisation_libelle |
396 |
|
FROM |
397 |
|
".DB_PREFIXE."dossier_autorisation |
398 |
|
WHERE |
399 |
|
dossier_autorisation = '$dossier_autorisation'"; |
400 |
|
|
401 |
|
$dossier_autorisation_libelle = $this->db->getOne($sql); |
402 |
|
$this->addToLog("get_dossier_autorisation_libelle(): db->getOne(\"".$sql."\")", VERBOSE_MODE); |
403 |
|
database::isError($dossier_autorisation_libelle); |
404 |
|
|
405 |
|
// Retourne le résultat |
406 |
|
return $dossier_autorisation_libelle; |
407 |
|
} |
408 |
|
|
409 |
function setvalF($val){ |
function setvalF($val){ |
410 |
parent::setvalF($val); |
parent::setvalF($val); |
435 |
unset ($this->valF['date_chantier']); |
unset ($this->valF['date_chantier']); |
436 |
unset ($this->valF['date_achevement']); |
unset ($this->valF['date_achevement']); |
437 |
unset ($this->valF['date_conformite']); |
unset ($this->valF['date_conformite']); |
438 |
|
|
439 |
|
// Durée de validaité lors de la création du dossier d'instruction |
440 |
|
$this->valF['duree_validite'] = $this->get_duree_validite($this->valF['dossier_autorisation']); |
441 |
} |
} |
442 |
|
|
443 |
/*Vérification des données saisies*/ |
/*Vérification des données saisies*/ |
459 |
|
|
460 |
function setType(&$form,$maj) { |
function setType(&$form,$maj) { |
461 |
parent::setType($form,$maj); |
parent::setType($form,$maj); |
462 |
|
$form->setType('dossier','hidden'); |
463 |
$form->setType('amenagement','hidden'); // PC |
$form->setType('amenagement','hidden'); // PC |
464 |
$form->setType('parcelle_lot','hidden'); // PC |
$form->setType('parcelle_lot','hidden'); // PC |
465 |
$form->setType('parcelle_lot_lotissement','hidden'); // PC |
$form->setType('parcelle_lot_lotissement','hidden'); // PC |
468 |
$form->setType('evenement_suivant_tacite','hidden'); |
$form->setType('evenement_suivant_tacite','hidden'); |
469 |
$form->setType('evenement_suivant_tacite_incompletude','hidden'); |
$form->setType('evenement_suivant_tacite_incompletude','hidden'); |
470 |
$form->setType('etat_pendant_incompletude','hidden'); |
$form->setType('etat_pendant_incompletude','hidden'); |
471 |
|
$form->setType('duree_validite','hidden'); |
472 |
if ($maj < 2) { //ajouter et modifier |
if ($maj < 2) { //ajouter et modifier |
473 |
// cache |
// cache |
474 |
if($maj==0) $form->setType('dossier', 'hidden'); |
if($maj==0) $form->setType('dossier_libelle', 'hidden'); |
475 |
$form->setType('annee', 'hidden'); |
$form->setType('annee', 'hidden'); |
476 |
$form->setType('parcelle_archive','hidden'); |
$form->setType('parcelle_archive','hidden'); |
477 |
$form->setType('parcelle_lot_archive','hidden'); |
$form->setType('parcelle_lot_archive','hidden'); |
478 |
|
|
479 |
$form->setType('geom1', 'hidden'); |
$form->setType('geom1', 'hidden'); |
480 |
$form->setType('geom', 'geom'); |
$form->setType('geom', 'geom'); |
481 |
$form->setType('servitude', 'hiddenstatic'); |
$form->setType('servitude', 'hiddenstatic'); |
|
|
|
|
//select |
|
|
$form->setType('terrain_numero_complement','select'); |
|
|
|
|
482 |
|
|
483 |
|
|
484 |
// hiddenstatic |
// hiddenstatic |
485 |
if($maj==1) $form->setType('dossier', 'hiddenstatic'); |
if($maj==1) $form->setType('dossier_libelle', 'hiddenstatic'); |
486 |
$form->setType('etat','hiddenstatic'); |
$form->setType('etat','hiddenstatic'); |
487 |
$form->setType('avis_decision','hiddenstatic'); |
$form->setType('avis_decision','hiddenstatic'); |
488 |
$form->setType('delai_incompletude','hiddenstatic'); |
$form->setType('delai_incompletude','hiddenstatic'); |
588 |
$form->setType('shob', 'hidden'); |
$form->setType('shob', 'hidden'); |
589 |
$form->setType('lot', 'hidden'); |
$form->setType('lot', 'hidden'); |
590 |
} |
} |
591 |
|
|
592 |
|
// Le profil Qualificateur ne peut modifier seulement les champs |
593 |
|
// autorite_competente, a_qualifier et erp |
594 |
|
if ($this->f->isUserQualificateur()) { |
595 |
|
|
596 |
|
// En modification |
597 |
|
if ($maj == 1) { |
598 |
|
|
599 |
|
$form->setType('numero_versement_archive', 'static'); |
600 |
|
$form->setType('enjeu_urba', 'checkboxstatic'); |
601 |
|
$form->setType('enjeu_erp', 'checkboxstatic'); |
602 |
|
$form->setType('description','textareastatic'); |
603 |
|
$form->setType('terrain_references_cadastrales','referencescadastralesstatic'); |
604 |
|
$form->setType('terrain_adresse_voie_numero','static'); |
605 |
|
$form->setType('terrain_adresse_voie','static'); |
606 |
|
$form->setType('terrain_adresse_lieu_dit','static'); |
607 |
|
$form->setType('terrain_adresse_localite','static'); |
608 |
|
$form->setType('terrain_adresse_code_postal','static'); |
609 |
|
$form->setType('terrain_adresse_bp','static'); |
610 |
|
$form->setType('terrain_adresse_cedex','static'); |
611 |
|
$form->setType('terrain_superficie','static'); |
612 |
|
} |
613 |
|
} |
614 |
|
|
615 |
// |
// |
616 |
if(!$this->f->getParameter('afficher_division') === 'true') { |
if(!$this->f->getParameter('afficher_division') === 'true') { |
617 |
$form->setType('division', 'hidden'); |
$form->setType('division', 'hidden'); |
618 |
} |
} |
619 |
$form->setType('dossier_autorisation', 'hiddenstatic'); |
$form->setType('dossier_autorisation', 'hidden'); |
620 |
|
$form->setType('dossier_autorisation_libelle', 'hiddenstatic'); |
621 |
$form->setType('dossier_instruction_type', 'selecthiddenstatic'); |
$form->setType('dossier_instruction_type', 'selecthiddenstatic'); |
622 |
// |
// |
623 |
if ($maj == 0) { |
if ($maj == 0) { |
680 |
$contenu[0]=array('Non','Oui'); |
$contenu[0]=array('Non','Oui'); |
681 |
$contenu[1]=array('Non','Oui'); |
$contenu[1]=array('Non','Oui'); |
682 |
$form->setSelect("accord_tacite",$contenu); |
$form->setSelect("accord_tacite",$contenu); |
683 |
// terrain_numero_complement |
|
|
$contenu=array(); |
|
|
$contenu[0]=array('','bis','ter','quater'); |
|
|
$contenu[1]=array('','bis','ter','quater'); |
|
|
$form->setSelect("terrain_numero_complement",$contenu); |
|
684 |
// geom *** a voir |
// geom *** a voir |
685 |
if($maj==1){ //modification |
if($maj==1){ //modification |
686 |
$contenu=array(); |
$contenu=array(); |
724 |
$form->setLib('geom',''); |
$form->setLib('geom',''); |
725 |
$form->setLib('date_limite',_("date limite d'instruction")); |
$form->setLib('date_limite',_("date limite d'instruction")); |
726 |
$form->setLib('delai',_("delai d'instruction")); |
$form->setLib('delai',_("delai d'instruction")); |
727 |
|
$form->setLib('accord_tacite',_("decision tacite")); |
728 |
} |
} |
729 |
|
|
730 |
function setGroupe(&$form,$maj){ |
function setGroupe(&$form,$maj){ |
762 |
|
|
763 |
function setLayout(&$form, $maj) { |
function setLayout(&$form, $maj) { |
764 |
// |
// |
765 |
$form->setBloc('dossier', 'D', '', ($maj == 3 ? 'col_9':'col_12')); |
$form->setBloc('dossier_libelle', 'D', '', ($maj == 3 ? 'col_9':'col_12')); |
766 |
$form->setBloc('dossier', 'D', '', 'col_9'); |
$form->setBloc('dossier_libelle', 'D', '', 'col_9'); |
767 |
|
|
768 |
$form->setFieldset('dossier', 'D', _("Dossier d'instruction")); |
$form->setFieldset('dossier_libelle', 'D', _("Dossier d'instruction")); |
769 |
$form->setFieldset('autorite_competente', 'F'); |
$form->setFieldset('numero_versement_archive', 'F'); |
770 |
|
|
771 |
$form->setBloc('autorite_competente', 'F'); |
$form->setBloc('numero_versement_archive', 'F'); |
772 |
|
|
773 |
$form->setBloc('date_demande', 'D', '', 'col_3'); |
$form->setBloc('date_demande', 'D', '', 'col_3'); |
774 |
|
|
1484 |
|
|
1485 |
$this->listeDemandeur("dossier", $this->getVal('dossier')); |
$this->listeDemandeur("dossier", $this->getVal('dossier')); |
1486 |
|
|
1487 |
if($maj < 2 AND !$this->correct) { |
if($maj < 2 AND !$this->correct AND !$this->f->isUserQualificateur()) { |
1488 |
$linkable = true; |
$linkable = true; |
1489 |
} else { |
} else { |
1490 |
$linkable = false; |
$linkable = false; |
1652 |
|
|
1653 |
return $donnees_techniques; |
return $donnees_techniques; |
1654 |
} |
} |
1655 |
|
|
1656 |
|
/** |
1657 |
|
* Surcharge du bouton retour afin de retourner sur la recherche de dossiers |
1658 |
|
* d'instruction existant |
1659 |
|
*/ |
1660 |
|
function retour($premier = 0, $recherche = "", $tricol = "") { |
1661 |
|
|
1662 |
|
echo "\n<a class=\"retour\" "; |
1663 |
|
echo "href=\""; |
1664 |
|
// |
1665 |
|
if($this->getParameter("idx_dossier") != "") { |
1666 |
|
echo "tab.php?"; |
1667 |
|
echo "obj=recherche_dossier"; |
1668 |
|
|
1669 |
|
} else { |
1670 |
|
if($this->getParameter("retour")=="form" AND !($this->getParameter("validation")>0 AND $this->getParameter("maj")==2 AND $this->correct)) { |
1671 |
|
echo "form.php?"; |
1672 |
|
} else { |
1673 |
|
echo "tab.php?"; |
1674 |
|
} |
1675 |
|
// Permet de retourner sur la bonne page |
1676 |
|
if (isset($_GET['retourformulaire']) && $_GET['retourformulaire'] != '') { |
1677 |
|
echo "obj=".$_GET['retourformulaire']; |
1678 |
|
} else { |
1679 |
|
echo "obj=".get_class($this); |
1680 |
|
} |
1681 |
|
if($this->getParameter("retour")=="form") { |
1682 |
|
echo "&idx=".$this->getParameter("idx"); |
1683 |
|
echo "&idz=".$this->getParameter("idz"); |
1684 |
|
echo "&action=3"; |
1685 |
|
} |
1686 |
|
} |
1687 |
|
echo "&premier=".$this->getParameter("premier"); |
1688 |
|
echo "&tricol=".$this->getParameter("tricol"); |
1689 |
|
echo "&recherche=".$this->getParameter("recherche"); |
1690 |
|
echo "&selectioncol=".$this->getParameter("selectioncol"); |
1691 |
|
echo "&advs_id=".$this->getParameter("advs_id"); |
1692 |
|
echo "&valide=".$this->getParameter("valide"); |
1693 |
|
// |
1694 |
|
echo "\""; |
1695 |
|
echo ">"; |
1696 |
|
// |
1697 |
|
echo _("Retour"); |
1698 |
|
// |
1699 |
|
echo "</a>\n"; |
1700 |
|
|
1701 |
|
} |
1702 |
|
|
1703 |
|
/** |
1704 |
|
* Permet de modifier le fil d'Ariane |
1705 |
|
* @param string $ent Fil d'Ariane |
1706 |
|
* @param array $val Valeurs de l'objet |
1707 |
|
* @param intger $maj Mode du formulaire |
1708 |
|
*/ |
1709 |
|
function getFormTitle($ent) { |
1710 |
|
|
1711 |
|
// Fil d'Ariane |
1712 |
|
$ent = _("instruction")." -> "._("dossiers d'instruction"); |
1713 |
|
|
1714 |
|
// Si différent de l'ajout |
1715 |
|
if($this->getParameter("maj") != 0) { |
1716 |
|
// Si le champ dossier_libelle existe |
1717 |
|
if (trim($this->getVal("dossier_libelle")) != '') { |
1718 |
|
$ent .= " -> ".strtoupper($this->getVal("dossier_libelle")); |
1719 |
|
} |
1720 |
|
// Si le champ dossier existe |
1721 |
|
if (trim($this->getVal("dossier")) != '') { |
1722 |
|
$demandeur = $this->get_demandeur($this->getVal("dossier")); |
1723 |
|
// Si le demandeur existe |
1724 |
|
if (isset($demandeur) && trim($demandeur) != '') { |
1725 |
|
$ent .= " ".strtoupper($demandeur); |
1726 |
|
} |
1727 |
|
} |
1728 |
|
} |
1729 |
|
|
1730 |
|
// Change le fil d'Ariane |
1731 |
|
return $ent; |
1732 |
|
} |
1733 |
|
|
1734 |
|
/** |
1735 |
|
* Récupère le demandeur du dossier |
1736 |
|
* @return string Identifiant du dossier |
1737 |
|
*/ |
1738 |
|
private function get_demandeur($dossier) { |
1739 |
|
|
1740 |
|
// init de la variable de retour |
1741 |
|
$demandeur = ''; |
1742 |
|
|
1743 |
|
// Requête SQL |
1744 |
|
$sql = "SELECT |
1745 |
|
CASE WHEN demandeur.qualite='particulier' |
1746 |
|
THEN TRIM(CONCAT(demandeur.particulier_nom, ' ', demandeur.particulier_prenom)) |
1747 |
|
ELSE TRIM(CONCAT(demandeur.personne_morale_raison_sociale, ' ', demandeur.personne_morale_denomination)) |
1748 |
|
END as demandeur |
1749 |
|
FROM ".DB_PREFIXE."dossier |
1750 |
|
LEFT JOIN ".DB_PREFIXE."lien_dossier_demandeur |
1751 |
|
ON lien_dossier_demandeur.dossier=dossier.dossier |
1752 |
|
AND lien_dossier_demandeur.petitionnaire_principal IS TRUE |
1753 |
|
LEFT JOIN ".DB_PREFIXE."demandeur |
1754 |
|
ON lien_dossier_demandeur.demandeur=demandeur.demandeur |
1755 |
|
WHERE dossier.dossier ='".$dossier."'"; |
1756 |
|
$demandeur = $this->db->getOne($sql); |
1757 |
|
$this->f->addToLog("get_demandeur() : db->getOne(\"".$sql."\")", VERBOSE_MODE); |
1758 |
|
database::isError($demandeur); |
1759 |
|
|
1760 |
|
// Résultat retourné |
1761 |
|
return $demandeur; |
1762 |
|
} |
1763 |
|
|
1764 |
|
/** |
1765 |
|
* Récupère la durée de validité du type détaillé du dossier d'autorisation |
1766 |
|
* @param string $dossier_autorisation Identifiant dossier d'autorisation |
1767 |
|
* @return intger Durée de validité |
1768 |
|
*/ |
1769 |
|
function get_duree_validite($dossier_autorisation) { |
1770 |
|
|
1771 |
|
// init de la variable de retour |
1772 |
|
$duree_validite = ""; |
1773 |
|
|
1774 |
|
// Récupération de la duree de validite du dossier d'autorisation |
1775 |
|
$sql = "SELECT duree_validite_parametrage |
1776 |
|
FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
1777 |
|
LEFT JOIN ".DB_PREFIXE."dossier_autorisation |
1778 |
|
ON dossier_autorisation.dossier_autorisation_type_detaille = dossier_autorisation_type_detaille.dossier_autorisation_type_detaille |
1779 |
|
WHERE dossier_autorisation.dossier_autorisation='".$dossier_autorisation."'"; |
1780 |
|
$duree_validite = $this->db->getOne($sql); |
1781 |
|
$this->f->addToLog("get_duree_validite(): db->getOne(\"".$sql."\");", VERBOSE_MODE); |
1782 |
|
database::isError($duree_validite); |
1783 |
|
|
1784 |
|
// retourne le résultat |
1785 |
|
return $duree_validite; |
1786 |
|
|
1787 |
|
} |
1788 |
|
|
1789 |
}// fin classe |
}// fin classe |
1790 |
?> |
?> |