12 |
* var $idxformulaire; |
* var $idxformulaire; |
13 |
* - modification des données dans dossier trigger avant |
* - modification des données dans dossier trigger avant |
14 |
* [modify dossier data with trigger function] |
* [modify dossier data with trigger function] |
15 |
* - function moisdate : pour ajouter des mois a une date |
* - function mois_date : pour ajouter des mois a une date |
16 |
* [add months (delay) and calculation final date] |
* [add months (delay) and calculation final date] |
17 |
* - voir script_lang.js : bible ... |
* - voir script_lang.js : bible ... |
18 |
* |
* |
125 |
|
|
126 |
//On récuppère le statut du dossier d'instruction |
//On récuppère le statut du dossier d'instruction |
127 |
$statut = $this->getStatutAutorisationDossier($idxformulaire); |
$statut = $this->getStatutAutorisationDossier($idxformulaire); |
128 |
if ( $this->f->isUserInstructeur() && $statut == "cloture" ){ |
// Si l'utilisateur est un instructeur, que le statut est clôturé |
129 |
|
// et que l'événement n'est pas identifié comme non verrouillable |
130 |
|
if ( $this->f->isUserInstructeur() && $statut == "cloture" |
131 |
|
&& $this->checkEvenementNonVerrouillable($this->getVal("instruction")) === false){ |
132 |
|
|
133 |
//On cache le lien de modification |
//On cache les liens du portlet |
134 |
$this->parameters["actions"]["modifier"] = NULL; |
$this->parameters["actions"]["modifier"] = NULL; |
135 |
$this->actions_sup["finalisation"] = NULL; |
$this->actions_sup["finalisation"] = NULL; |
136 |
$this->actions_sup["definalisation"] = NULL; |
$this->actions_sup["definalisation"] = NULL; |
154 |
} |
} |
155 |
|
|
156 |
$retourformulaire = $this->getParameter("retourformulaire"); |
$retourformulaire = $this->getParameter("retourformulaire"); |
157 |
// Si l'utilisateur est un instructeur et que le dossier est cloturé |
// Si l'utilisateur est un instructeur, que le dossier est cloturé, |
158 |
|
// que l'utilisateur est dans un sous formulaire précis, que le |
159 |
|
// formulaire n'est pas en mode consulter ou ajouter et que l'événement |
160 |
|
// n'est pas identifié comme non verrouillable |
161 |
if ( $this->f->isUserInstructeur() && |
if ( $this->f->isUserInstructeur() && |
162 |
$this->getStatutAutorisationDossier($this->getParameter("idxformulaire")) == "cloture" && |
$this->getStatutAutorisationDossier($this->getParameter("idxformulaire")) == "cloture" |
163 |
( |
&& ( |
164 |
$retourformulaire == 'dossier' || |
$retourformulaire == 'dossier' || |
165 |
$retourformulaire == 'dossier_instruction' || |
$retourformulaire == 'dossier_instruction' || |
166 |
$retourformulaire == 'dossier_instruction_mes_encours' || |
$retourformulaire == 'dossier_instruction_mes_encours' || |
168 |
$retourformulaire == 'dossier_instruction_mes_clotures' || |
$retourformulaire == 'dossier_instruction_mes_clotures' || |
169 |
$retourformulaire == 'dossier_instruction_tous_clotures' |
$retourformulaire == 'dossier_instruction_tous_clotures' |
170 |
) |
) |
171 |
&& $this->getParameter("maj") != 3 && $this->getParameter("maj") != 0 ) { |
&& $this->getParameter("maj") != 3 |
172 |
|
&& $this->getParameter("maj") != 0 |
173 |
|
&& $this->checkEvenementNonVerrouillable($this->getVal("instruction")) === false) { |
174 |
|
|
175 |
return false; |
return false; |
176 |
} |
} |
177 |
// |
// |
262 |
parent::setType($form, $maj); |
parent::setType($form, $maj); |
263 |
// On cache tous les champs |
// On cache tous les champs |
264 |
// XXX |
// XXX |
265 |
$form->setType('complement3', 'hidden'); |
$form->setType('complement3_om_html', 'hidden'); |
266 |
$form->setType('bible3', 'hidden'); |
$form->setType('bible3', 'hidden'); |
267 |
$form->setType('complement4', 'hidden'); |
$form->setType('complement4_om_html', 'hidden'); |
268 |
$form->setType('bible4', 'hidden'); |
$form->setType('bible4', 'hidden'); |
269 |
$form->setType('complement5', 'hidden'); |
$form->setType('complement5_om_html', 'hidden'); |
270 |
$form->setType('bible5', 'hidden'); |
$form->setType('bible5', 'hidden'); |
271 |
$form->setType('complement6', 'hidden'); |
$form->setType('complement6_om_html', 'hidden'); |
272 |
$form->setType('bible6', 'hidden'); |
$form->setType('bible6', 'hidden'); |
273 |
$form->setType('complement7', 'hidden'); |
$form->setType('complement7_om_html', 'hidden'); |
274 |
$form->setType('bible7', 'hidden'); |
$form->setType('bible7', 'hidden'); |
275 |
$form->setType('complement8', 'hidden'); |
$form->setType('complement8_om_html', 'hidden'); |
276 |
$form->setType('bible8', 'hidden'); |
$form->setType('bible8', 'hidden'); |
277 |
$form->setType('complement9', 'hidden'); |
$form->setType('complement9_om_html', 'hidden'); |
278 |
$form->setType('bible9', 'hidden'); |
$form->setType('bible9', 'hidden'); |
279 |
$form->setType('complement10', 'hidden'); |
$form->setType('complement10_om_html', 'hidden'); |
280 |
$form->setType('bible10', 'hidden'); |
$form->setType('bible10', 'hidden'); |
281 |
$form->setType('complement11', 'hidden'); |
$form->setType('complement11_om_html', 'hidden'); |
282 |
$form->setType('bible11', 'hidden'); |
$form->setType('bible11', 'hidden'); |
283 |
$form->setType('complement12', 'hidden'); |
$form->setType('complement12_om_html', 'hidden'); |
284 |
$form->setType('bible12', 'hidden'); |
$form->setType('bible12', 'hidden'); |
285 |
$form->setType('complement13', 'hidden'); |
$form->setType('complement13_om_html', 'hidden'); |
286 |
$form->setType('bible13', 'hidden'); |
$form->setType('bible13', 'hidden'); |
287 |
$form->setType('complement14', 'hidden'); |
$form->setType('complement14_om_html', 'hidden'); |
288 |
$form->setType('bible14', 'hidden'); |
$form->setType('bible14', 'hidden'); |
289 |
$form->setType('complement15', 'hidden'); |
$form->setType('complement15_om_html', 'hidden'); |
290 |
$form->setType('bible15', 'hidden'); |
$form->setType('bible15', 'hidden'); |
291 |
// |
// |
292 |
$form->setType('delai', 'hidden'); |
$form->setType('delai', 'hidden'); |
331 |
if ($maj < 2) { //ajouter et modifier |
if ($maj < 2) { //ajouter et modifier |
332 |
$form->setType('destinataire', 'hidden'); |
$form->setType('destinataire', 'hidden'); |
333 |
$form->setType('lettretype', 'hiddenstatic'); |
$form->setType('lettretype', 'hiddenstatic'); |
334 |
$form->setType('complement', 'textarea'); |
$form->setType('complement_om_html', 'html'); |
335 |
$form->setType('complement2', 'textarea'); |
$form->setType('complement2_om_html', 'html'); |
336 |
$form->setType('bible_auto', 'httpclick'); |
$form->setType('bible_auto', 'httpclick'); |
337 |
$form->setType('bible', 'httpclick'); |
$form->setType('bible', 'httpclick'); |
338 |
$form->setType('bible2', 'httpclick'); |
$form->setType('bible2', 'httpclick'); |
454 |
ON evenement.evenement = transition.evenement |
ON evenement.evenement = transition.evenement |
455 |
AND dossier.etat=transition.etat |
AND dossier.etat=transition.etat |
456 |
WHERE dossier.dossier='".$this->idxformulaire."' |
WHERE dossier.dossier='".$this->idxformulaire."' |
457 |
ORDER BY evenement.action"; |
ORDER BY evenement.libelle, evenement.action"; |
458 |
$res = $db->query($sql); |
$res = $db->query($sql); |
459 |
$this->addToLog("setSelect(): db->query(\"".$sql."\");", VERBOSE_MODE); |
$this->addToLog("setSelect(): db->query(\"".$sql."\");", VERBOSE_MODE); |
460 |
if (database::isError($res)) { |
if (database::isError($res)) { |
506 |
// |
// |
507 |
parent::cleSecondaire($id, $db, $val, $DEBUG); |
parent::cleSecondaire($id, $db, $val, $DEBUG); |
508 |
|
|
509 |
//verifie evt instr sans crea instr |
$id = $this->getVal($this->clePrimaire); |
|
$sql = "select demande_type.dossier_instruction_type |
|
|
from ".DB_PREFIXE."demande_type |
|
|
left join ".DB_PREFIXE."demande |
|
|
on |
|
|
demande.demande_type = demande_type.demande_type |
|
|
where demande.instruction_recepisse = ".$id; |
|
510 |
|
|
|
$res = $this->db->getOne($sql); |
|
511 |
|
|
512 |
// Aucune clé secondaire n'a été trouvée, || c'est un evt sans creation de DIl'instruction peut être supprimée |
//Requête de vérification que cet événement d'instruction n'est pas lié |
513 |
|
//à la création d'un dossier d'instruction |
514 |
|
$sql = "SELECT demande_type.dossier_instruction_type |
515 |
|
FROM ".DB_PREFIXE."demande_type |
516 |
|
LEFT JOIN ".DB_PREFIXE."demande |
517 |
|
ON demande.demande_type = demande_type.demande_type |
518 |
|
WHERE demande.instruction_recepisse = ".$id; |
519 |
|
$res = $this->db->getOne($sql); |
520 |
|
$this->addToLog("cleSecondaire(): db->getone(\"".$sql."\");", VERBOSE_MODE); |
521 |
|
if (database::isError($res)) { |
522 |
|
die($res->getMessage()); |
523 |
|
} |
524 |
|
|
525 |
|
// Aucune clé secondaire n'a été trouvée ou c'est un événement sans |
526 |
|
//création de dossier d'instruction, l'événement d'instruction peut être |
527 |
|
//supprimé |
528 |
if ( $this->correct !== false || $res == null || $res == ""){ |
if ( $this->correct !== false || $res == null || $res == ""){ |
529 |
|
|
530 |
|
// Requête de vérification que cet événement d'instruction est lié |
531 |
|
// à une demande |
532 |
|
$sql = "SELECT demande |
533 |
|
FROM ".DB_PREFIXE."demande |
534 |
|
WHERE instruction_recepisse = ".$id; |
535 |
|
$res = $this->db->getOne($sql); |
536 |
|
$this->addToLog("cleSecondaire(): db->getone(\"".$sql."\");", VERBOSE_MODE); |
537 |
|
if (database::isError($res)) { |
538 |
|
die($res->getMessage()); |
539 |
|
} |
540 |
|
|
541 |
|
//Si c'est un événement d'instruction lié à une demande |
542 |
|
if ($res != null || $res != ""){ |
543 |
|
|
544 |
if ($res == null || $res == ""){ |
require_once "../obj/demande.class.php"; |
545 |
|
$demande = new demande($res, $this->db, DEBUG); |
546 |
//utiliser ftion modifier |
|
547 |
$sql = "update ".DB_PREFIXE."demande |
//On met à jour la demande en supprimant la liaison vers |
548 |
set demande.instruction_recepisse = NULL |
//l'événement d'instruction |
549 |
where demande.instruction_recepisse = ".$id; |
$demande->setParameter("maj", 1); |
550 |
|
$valF = array(); |
551 |
$res = $this->db->query($sql); |
foreach($demande->champs as $identifiant => $champ) { |
552 |
|
$valF[$champ] = $demande->val[$identifiant]; |
553 |
|
} |
554 |
|
$valF['date_demande']=$demande->dateDBToForm($valF['date_demande']); |
555 |
|
$valF['instruction_recepisse']=NULL; |
556 |
|
$ret = $demande->modifier($valF, $this->db, DEBUG); |
557 |
} |
} |
558 |
|
|
559 |
/** |
/** |
674 |
|
|
675 |
$form->setBloc('date_retour_controle_legalite','F'); |
$form->setBloc('date_retour_controle_legalite','F'); |
676 |
|
|
677 |
$form->setBloc('complement','D',"","col_12"); |
$form->setBloc('complement_om_html','D',"","col_12"); |
678 |
$form->setFieldset('complement','D',_('Complement')); |
$form->setFieldset('complement_om_html','D',_('Complement')); |
679 |
$form->setFieldset('bible','F',''); |
$form->setFieldset('bible','F',''); |
680 |
$form->setBloc('bible','F'); |
$form->setBloc('bible','F'); |
681 |
|
|
682 |
$form->setBloc('complement2','D',"","col_12"); |
$form->setBloc('complement2_om_html','D',"","col_12"); |
683 |
$form->setFieldset('complement2','D',_('Complement 2')); |
$form->setFieldset('complement2_om_html','D',_('Complement 2')); |
684 |
$form->setFieldset('bible2','F',''); |
$form->setFieldset('bible2','F',''); |
685 |
$form->setBloc('bible2','F'); |
$form->setBloc('bible2','F'); |
686 |
} |
} |
781 |
if (database::isError($res)) { |
if (database::isError($res)) { |
782 |
die($res->getMessage()); |
die($res->getMessage()); |
783 |
} |
} |
784 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) { |
$row=& $res->fetchRow(DB_FETCHMODE_ASSOC); |
785 |
// XXX On stocke la date de dépôt actuelle du dossier d'instruction |
$this->updateArchiveData($row); |
786 |
// dans un attribut de la classe |
$this->archive_date_depot = $row['date_depot']; |
787 |
$this->archive_date_depot = $row['date_depot']; |
|
|
// Récupération de la valeur actuelle du délai, de l'accord tacite, |
|
|
// de l'état et de l'avis du dossier d'instruction |
|
|
$this->valF['archive_delai']=$row['delai']; |
|
|
$this->valF['archive_accord_tacite']=$row['accord_tacite']; |
|
|
$this->valF['archive_etat']=$row['etat']; |
|
|
$this->valF['archive_avis']=$row['avis_decision']; |
|
|
// Récupération de la valeur actuelle des 9 dates du dossier |
|
|
// d'instruction |
|
|
if ($row['date_complet'] != '') { |
|
|
$this->valF['archive_date_complet']=$row['date_complet']; |
|
|
} |
|
|
if ($row['date_dernier_depot'] != '') { |
|
|
$this->valF['archive_date_dernier_depot']=$row['date_dernier_depot']; |
|
|
} |
|
|
if ($row['date_rejet']!='') { |
|
|
$this->valF['archive_date_rejet']= $row['date_rejet']; |
|
|
} |
|
|
if ($row['date_limite']!='') { |
|
|
$this->valF['archive_date_limite']= $row['date_limite']; |
|
|
} |
|
|
if ($row['date_notification_delai']!='') { |
|
|
$this->valF['archive_date_notification_delai']= $row['date_notification_delai']; |
|
|
} |
|
|
if ($row['date_decision']!='') { |
|
|
$this->valF['archive_date_decision']= $row['date_decision']; |
|
|
} |
|
|
if ($row['date_validite']!='') { |
|
|
$this->valF['archive_date_validite']= $row['date_validite']; |
|
|
} |
|
|
if ($row['date_achevement']!='') { |
|
|
$this->valF['archive_date_achevement']= $row['date_achevement']; |
|
|
} |
|
|
if ($row['date_chantier']!='') { |
|
|
$this->valF['archive_date_chantier']= $row['date_chantier']; |
|
|
} |
|
|
if ($row['date_conformite']!='') { |
|
|
$this->valF['archive_date_conformite']= $row['date_conformite']; |
|
|
} |
|
|
if ($row['incompletude']!='') { |
|
|
$this->valF['archive_incompletude']= $row['incompletude']; |
|
|
} |
|
|
if ($row['evenement_suivant_tacite']!='') { |
|
|
$this->valF['archive_evenement_suivant_tacite']= $row['evenement_suivant_tacite']; |
|
|
} |
|
|
if ($row['evenement_suivant_tacite_incompletude']!='') { |
|
|
$this->valF['archive_evenement_suivant_tacite_incompletude']= $row['evenement_suivant_tacite_incompletude']; |
|
|
} |
|
|
if ($row['etat_pendant_incompletude']!='') { |
|
|
$this->valF['archive_etat_pendant_incompletude']= $row['etat_pendant_incompletude']; |
|
|
} |
|
|
if ($row['date_limite_incompletude']!='') { |
|
|
$this->valF['archive_date_limite_incompletude']= $row['date_limite_incompletude']; |
|
|
} |
|
|
if ($row['delai_incompletude']!='') { |
|
|
$this->valF['archive_delai_incompletude']= $row['delai_incompletude']; |
|
|
} |
|
|
if ($row['autorite_competente']!='') { |
|
|
$this->valF['archive_autorite_competente']= $row['autorite_competente']; |
|
|
} |
|
|
if ($row['duree_validite']!='') { |
|
|
$this->valF['duree_validite']= $row['duree_validite']; |
|
|
} |
|
|
} |
|
788 |
// Récupération de la duree de validite du dossier d'autorisation |
// Récupération de la duree de validite du dossier d'autorisation |
789 |
$sql = "SELECT duree_validite_parametrage |
$sql = "SELECT duree_validite_parametrage |
790 |
FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
FROM ".DB_PREFIXE."dossier_autorisation_type_detaille |
835 |
// Booléen retourné |
// Booléen retourné |
836 |
$res_bool = true; |
$res_bool = true; |
837 |
|
|
838 |
// Si le tableau n'est pas vide |
// S'il y a un comparateur |
839 |
if (count($tabRestriction) > 0) { |
if (in_array(">=", $tabRestriction) |
840 |
|
|| in_array("<=", $tabRestriction)) { |
841 |
|
|
842 |
// Boucle dans le tableau pour récupérer seulement les valeurs |
// Si le tableau n'est pas vide |
843 |
foreach ($tabRestriction as $key => $value) { |
if (count($tabRestriction) > 0) { |
844 |
|
|
845 |
// |
// Boucle dans le tableau pour récupérer seulement les valeurs |
846 |
if (!in_array($value, $operateurs)) { |
foreach ($tabRestriction as $key => $value) { |
847 |
if ($this->getRestrictionValue($value) != false) { |
|
848 |
$res[] = $this->getRestrictionValue($value); |
// |
849 |
} else { |
if (!in_array($value, $operateurs)) { |
850 |
return false; |
if ($this->getRestrictionValue($value) != false) { |
851 |
|
$res[] = $this->getRestrictionValue($value); |
852 |
|
} else { |
853 |
|
// Message d'erreur |
854 |
|
$error_message = sprintf(_("Le champ %s de l'instruction %s est vide"), "<span class='bold'>".$value."</span>", "<span class='bold'>".$this->valF["instruction"]."</span>"); |
855 |
|
$this->addToMessage($error_message); |
856 |
|
// Arrête le traitement |
857 |
|
return false; |
858 |
|
} |
859 |
} |
} |
860 |
} |
} |
|
} |
|
861 |
|
|
862 |
// Boucle dans le tableau |
// Boucle dans le tableau |
863 |
// commence à 1 car le 0 doit rester inchangé tout au long du |
// commence à 1 car le 0 doit rester inchangé tout au long du |
864 |
// traitement |
// traitement |
865 |
for ($i = 1; $i<count($tabRestriction); $i++) { |
for ($i = 1; $i<count($tabRestriction); $i++) { |
866 |
|
|
867 |
// Récupère le comparateur |
// Récupère le comparateur |
868 |
if ($tabRestriction[$i] === ">=" |
if ($tabRestriction[$i] === ">=" |
869 |
|| $tabRestriction[$i] === "<=") { |
|| $tabRestriction[$i] === "<=") { |
870 |
$comparateur = $tabRestriction[$i]; |
$comparateur = $tabRestriction[$i]; |
871 |
} |
} |
872 |
|
|
873 |
// Si l'opérateur qui suit est un "+" |
// Si l'opérateur qui suit est un "+" |
874 |
if ($tabRestriction[$i] === "+") { |
if ($tabRestriction[$i] === "+") { |
875 |
$dateDep = strtotime($res[$j]); |
$dateDep = $res[$j]; |
876 |
unset($res[$j]);$j++; |
unset($res[$j]);$j++; |
877 |
$duree = $res[$j]; |
$duree = $res[$j]; |
878 |
unset($res[$j]); |
unset($res[$j]); |
879 |
$res[$j] = date('Y-m-d', |
$res[$j] = $this->f->mois_date($dateDep, $duree, "+"); |
880 |
strtotime('+'.$duree.' month', $dateDep)); |
} |
881 |
} |
|
882 |
|
// Si l'opérateur qui suit est un "-" |
883 |
// Si l'opérateur qui suit est un "-" |
if ($tabRestriction[$i] === "-") { |
884 |
if ($tabRestriction[$i] === "-") { |
$dateDep = $res[$j]; |
885 |
$dateDep = strtotime($res[$j]); |
unset($res[$j]);$j++; |
886 |
unset($res[$j]);$j++; |
$duree = $res[$j]; |
887 |
$duree = $res[$j]; |
unset($res[$j]); |
888 |
unset($res[$j]); |
$res[$j] = $this->f->mois_date($dateDep, $duree, "-"); |
889 |
$res[$j] = date('Y-m-d', |
} |
|
strtotime('-'.$duree.' month', $dateDep)); |
|
890 |
} |
} |
891 |
|
|
892 |
} |
} |
|
|
|
|
} |
|
893 |
|
|
894 |
// Si les tableau des résultats n'est pas vide |
// Si les tableau des résultats n'est pas vide |
895 |
if (count($res) > 0) { |
if (count($res) > 0) { |
|
// |
|
|
$res_bool = false; |
|
|
// Effectue le test |
|
|
if ($comparateur === ">=") { |
|
896 |
// |
// |
897 |
if (strtotime($res[0]) >= strtotime($res[$j])) { |
$res_bool = false; |
898 |
$res_bool = true; |
// Effectue le test |
899 |
|
if ($comparateur === ">=") { |
900 |
|
// |
901 |
|
if (strtotime($res[0]) >= strtotime($res[$j])) { |
902 |
|
$res_bool = true; |
903 |
|
} |
904 |
} |
} |
905 |
} |
if ($comparateur === "<=") { |
|
if ($comparateur === "<=") { |
|
906 |
|
|
907 |
if (strtotime($res[0]) <= strtotime($res[$j])) { |
if (strtotime($res[0]) <= strtotime($res[$j])) { |
908 |
$res_bool = true; |
$res_bool = true; |
909 |
|
} |
910 |
} |
} |
911 |
} |
} |
912 |
|
// Sinon une erreur s'affiche |
913 |
|
} else { |
914 |
|
|
915 |
|
// Message d'erreur |
916 |
|
$error_message = _("La restriction est sans comparateur"); |
917 |
|
$this->addToMessage($error_message); |
918 |
|
// Arrête le traitement |
919 |
|
return false; |
920 |
} |
} |
921 |
|
|
922 |
return $res_bool; |
return $res_bool; |
948 |
// Retourne la valeur du champ |
// Retourne la valeur du champ |
949 |
return $return; |
return $return; |
950 |
} |
} |
951 |
|
|
952 |
function regle($regle){ |
/** |
953 |
|
* Calcul des règle d'action. |
954 |
|
* @param string $rule Règle d'action |
955 |
|
* @param string $rule_name Nom de la règle |
956 |
|
* @param string $type Type de la règle |
957 |
|
* |
958 |
|
* @return mixed Résultat de la règle |
959 |
|
*/ |
960 |
|
function regle($rule, $rule_name, $type = null) { |
961 |
|
|
962 |
// Supprime tous les espaces de la chaîne de caractère |
// Supprime tous les espaces de la chaîne de caractère |
963 |
$regle = str_replace(' ', '', $regle); |
$rule = str_replace(' ', '', $rule); |
964 |
// Coupe la chaîne au niveau des "+" |
// Coupe la chaîne au niveau de l'opérateur |
965 |
$temp = explode ("+",$regle); |
$operands = explode ("+", $rule); |
966 |
//echo '|'.$regle; |
// Nombre d'opérande |
967 |
// cas rejet |
$nb_operands = count($operands); |
968 |
if($regle=="null") // 1 dimension -> null |
|
969 |
|
// Règle à null |
970 |
|
if ($rule == "null") { |
971 |
return null; |
return null; |
|
if(sizeof($temp)==1) // 1 dimension |
|
|
if($temp[0]=="archive_date_depot") // initialisation avec le depot |
|
|
return $this->$regle; |
|
|
else // cas general |
|
|
return $this->valF[$regle]; |
|
|
if(sizeof($temp)==2){ // 2 dimensions |
|
|
if($temp[0]=="archive_date_depot") //initialisation avec le depot |
|
|
if(is_numeric($temp[1])) |
|
|
return $this->moisdate($this->$temp[0], $temp[1]); |
|
|
else |
|
|
return $this->moisdate($this->$temp[0], $this->valF[$temp[1]]); |
|
|
if($temp[0]=="archive_delai") // majoration de delai |
|
|
return $this->valF[$temp[0]]+$this->valF[$temp[1]]; |
|
|
// cas general 2 dimensions |
|
|
if(is_numeric($temp[1])) |
|
|
return $this->moisdate($this->valF[$temp[0]], $temp[1]); |
|
|
else |
|
|
return $this->moisdate($this->valF[$temp[0]], $this->valF[$temp[1]]); |
|
|
} |
|
|
if(sizeof($temp)==3){ // 3 dimensions |
|
|
// cas date de validite de sursis |
|
|
if(is_numeric($temp[1])) |
|
|
$temp1 = $this->moisdate($this->valF[$temp[0]], $temp[1]); |
|
|
else |
|
|
$temp1 = $this->moisdate($this->valF[$temp[0]], $this->valF[$temp[1]]); |
|
|
if(is_numeric($temp[2])) |
|
|
return $this->moisdate($temp1, $temp[2]); |
|
|
else |
|
|
return $this->moisdate($temp1, $this->valF[$temp[2]]); |
|
972 |
} |
} |
973 |
|
|
974 |
|
// Si c'est une règle spécifique |
975 |
|
if ($rule_name == "regle_autorite_competente" |
976 |
|
|| $rule_name == "regle_etat" |
977 |
|
|| $rule_name == "regle_accord_tacite" |
978 |
|
|| $rule_name == "regle_avis") { |
979 |
|
// |
980 |
|
return $this->valF[$rule]; |
981 |
|
} |
982 |
|
|
983 |
|
// Tableau des champs de type date |
984 |
|
$rule_type_date = array( |
985 |
|
"regle_date_limite", |
986 |
|
"regle_date_notification_delai", |
987 |
|
"regle_date_complet", |
988 |
|
"regle_date_validite", |
989 |
|
"regle_date_decision", |
990 |
|
"regle_date_chantier", |
991 |
|
"regle_date_achevement", |
992 |
|
"regle_date_conformite", |
993 |
|
"regle_date_rejet", |
994 |
|
"regle_date_dernier_depot", |
995 |
|
"regle_date_limite_incompletude", |
996 |
|
); |
997 |
|
// Tableau des champs de type numérique |
998 |
|
$rule_type_numeric = array( |
999 |
|
"regle_delai", |
1000 |
|
"regle_delai_incompletude", |
1001 |
|
); |
1002 |
|
|
1003 |
|
// Définit le type du champ |
1004 |
|
if (in_array($rule_name, $rule_type_date) == true) { |
1005 |
|
$type = "date"; |
1006 |
|
} |
1007 |
|
if (in_array($rule_name, $rule_type_numeric) == true) { |
1008 |
|
$type = "numeric"; |
1009 |
|
} |
1010 |
|
|
1011 |
|
// Initialisation des variables |
1012 |
|
$key_date = 0; |
1013 |
|
$total_numeric = 0; |
1014 |
|
|
1015 |
|
// Pour chaque opérande |
1016 |
|
foreach ($operands as $key => $operand) { |
1017 |
|
|
1018 |
|
// Si c'est une règle de type date |
1019 |
|
if ($type == 'date') { |
1020 |
|
// Vérifie si au moins une des opérandes est une date |
1021 |
|
if (!is_numeric($operand) |
1022 |
|
&& isset($this->valF[$operand]) |
1023 |
|
&& $this->f->check_date($this->valF[$operand]) == true) { |
1024 |
|
// Récupère la position de la date |
1025 |
|
$key_date = $key; |
1026 |
|
} |
1027 |
|
// Les autres opérandes doivent être que des numériques |
1028 |
|
if (is_numeric($operand) == true) { |
1029 |
|
// Ajoute l'opérande au total |
1030 |
|
$total_numeric += $operand; |
1031 |
|
} |
1032 |
|
if (!is_numeric($operand) |
1033 |
|
&& isset($this->valF[$operand]) |
1034 |
|
&& is_numeric($this->valF[$operand]) == true) { |
1035 |
|
// Ajoute l'opérande au total |
1036 |
|
$total_numeric += $this->valF[$operand]; |
1037 |
|
} |
1038 |
|
} |
1039 |
|
|
1040 |
|
// Si c'est une règle de type numérique |
1041 |
|
if ($type == 'numeric') { |
1042 |
|
// Les opérandes doivent être que des numériques |
1043 |
|
if (is_numeric($operand) == true) { |
1044 |
|
// Ajoute l'opérande au total |
1045 |
|
$total_numeric += $operand; |
1046 |
|
} |
1047 |
|
if (!is_numeric($operand) |
1048 |
|
&& isset($this->valF[$operand]) |
1049 |
|
&& is_numeric($this->valF[$operand]) == true) { |
1050 |
|
// Ajoute l'opérande au total |
1051 |
|
$total_numeric += $this->valF[$operand]; |
1052 |
|
} |
1053 |
|
} |
1054 |
|
} |
1055 |
|
|
1056 |
|
// Résultat pour une règle de type date |
1057 |
|
if ($type == 'date') { |
1058 |
|
// Retourne le calcul de la date |
1059 |
|
return $this->f->mois_date($this->valF[$operands[$key_date]], |
1060 |
|
$total_numeric, "+"); |
1061 |
|
} |
1062 |
|
|
1063 |
|
// Résultat pour une règle de type numérique |
1064 |
|
if ($type == 'numeric') { |
1065 |
|
// Retourne le calcul |
1066 |
|
return $total_numeric; |
1067 |
|
} |
1068 |
|
|
1069 |
} |
} |
|
|
|
|
|
|
1070 |
|
|
1071 |
function triggerajouterapres($id,&$db,$val,$DEBUG) { |
function triggerajouterapres($id,&$db,$val,$DEBUG) { |
1072 |
/** |
/** |
1119 |
|
|
1120 |
// pour chacune des regles, on applique la regle |
// pour chacune des regles, on applique la regle |
1121 |
if($row['regle_delai']!=''){ |
if($row['regle_delai']!=''){ |
1122 |
$valF['delai'] = $this->regle($row['regle_delai']); |
$valF['delai'] = $this->regle($row['regle_delai'], 'regle_delai'); |
1123 |
} |
} |
1124 |
if($row['regle_accord_tacite']!=''){ |
if($row['regle_accord_tacite']!=''){ |
1125 |
$valF['accord_tacite'] = $this->regle($row['regle_accord_tacite']); |
$valF['accord_tacite'] = $this->regle($row['regle_accord_tacite'], 'regle_accord_tacite'); |
1126 |
} |
} |
1127 |
if($row['regle_avis']!=''){ |
if($row['regle_avis']!=''){ |
1128 |
$valF['avis_decision'] = $this->regle($row['regle_avis']); |
$valF['avis_decision'] = $this->regle($row['regle_avis'], 'regle_avis'); |
1129 |
} |
} |
1130 |
if($row['regle_date_limite']!=''){ |
if($row['regle_date_limite']!=''){ |
1131 |
$valF['date_limite']= $this->regle($row['regle_date_limite']); |
$valF['date_limite']= $this->regle($row['regle_date_limite'], 'regle_date_limite'); |
1132 |
} |
} |
1133 |
if($row['regle_date_complet']!=''){ |
if($row['regle_date_complet']!=''){ |
1134 |
$valF['date_complet']= $this->regle($row['regle_date_complet']); |
$valF['date_complet']= $this->regle($row['regle_date_complet'], 'regle_date_complet'); |
1135 |
} |
} |
1136 |
if($row['regle_date_dernier_depot']!=''){ |
if($row['regle_date_dernier_depot']!=''){ |
1137 |
$valF['date_dernier_depot']= $this->regle($row['regle_date_dernier_depot']); |
$valF['date_dernier_depot']= $this->regle($row['regle_date_dernier_depot'], 'regle_date_dernier_depot'); |
1138 |
} |
} |
1139 |
if($row['regle_date_notification_delai']!=''){ |
if($row['regle_date_notification_delai']!=''){ |
1140 |
$valF['date_notification_delai']= $this->regle($row['regle_date_notification_delai']); |
$valF['date_notification_delai']= $this->regle($row['regle_date_notification_delai'], 'regle_date_notification_delai'); |
1141 |
} |
} |
1142 |
if($row['regle_date_decision']!=''){ |
if($row['regle_date_decision']!=''){ |
1143 |
$valF['date_decision']= $this->regle($row['regle_date_decision']); |
$valF['date_decision']= $this->regle($row['regle_date_decision'], 'regle_date_decision'); |
1144 |
} |
} |
1145 |
if($row['regle_date_rejet']!=''){ |
if($row['regle_date_rejet']!=''){ |
1146 |
$valF['date_rejet']= $this->regle($row['regle_date_rejet']); |
$valF['date_rejet']= $this->regle($row['regle_date_rejet'], 'regle_date_rejet'); |
1147 |
} |
} |
1148 |
if($row['regle_date_validite']!=''){ |
if($row['regle_date_validite']!=''){ |
1149 |
$valF['date_validite']= $this->regle($row['regle_date_validite']); |
$valF['date_validite']= $this->regle($row['regle_date_validite'], 'regle_date_validite'); |
1150 |
} |
} |
1151 |
if($row['regle_date_chantier']!=''){ |
if($row['regle_date_chantier']!=''){ |
1152 |
$valF['date_chantier']= $this->regle($row['regle_date_chantier']); |
$valF['date_chantier']= $this->regle($row['regle_date_chantier'], 'regle_date_chantier'); |
1153 |
} |
} |
1154 |
if($row['regle_date_achevement']!=''){ |
if($row['regle_date_achevement']!=''){ |
1155 |
$valF['date_achevement']= $this->regle($row['regle_date_achevement']); |
$valF['date_achevement']= $this->regle($row['regle_date_achevement'], 'regle_date_achevement'); |
1156 |
} |
} |
1157 |
if($row['regle_date_conformite']!=''){ |
if($row['regle_date_conformite']!=''){ |
1158 |
$valF['date_conformite']= $this->regle($row['regle_date_conformite']); |
$valF['date_conformite']= $this->regle($row['regle_date_conformite'], 'regle_date_conformite'); |
1159 |
} |
} |
1160 |
if($row['regle_date_limite_incompletude']!=''){ |
if($row['regle_date_limite_incompletude']!=''){ |
1161 |
$valF['date_limite_incompletude']= $this->regle($row['regle_date_limite_incompletude']); |
$valF['date_limite_incompletude']= $this->regle($row['regle_date_limite_incompletude'], 'regle_date_limite_incompletude'); |
1162 |
} |
} |
1163 |
if($row['regle_delai_incompletude']!=''){ |
if($row['regle_delai_incompletude']!=''){ |
1164 |
$valF['delai_incompletude']= $this->regle($row['regle_delai_incompletude']); |
$valF['delai_incompletude']= $this->regle($row['regle_delai_incompletude'], 'regle_delai_incompletude'); |
1165 |
} |
} |
1166 |
if($row['regle_autorite_competente']!=''){ |
if($row['regle_autorite_competente']!=''){ |
1167 |
$valF['autorite_competente']= $this->regle($row['regle_autorite_competente']); |
$valF['autorite_competente']= $this->regle($row['regle_autorite_competente'], 'regle_autorite_competente'); |
1168 |
} |
} |
1169 |
if($row['regle_etat']!=''){ |
if($row['regle_etat']!=''){ |
1170 |
// Si on est dans le cas général ou qu'on est en incomplétude et |
// Si on est dans le cas général ou qu'on est en incomplétude et |
1171 |
// qu'on a un événement de type incomplétude alors : on stocke |
// qu'on a un événement de type incomplétude alors : on stocke |
1172 |
// l'état dans la variable courante |
// l'état dans la variable courante |
1173 |
if ($incompletude == FALSE OR $this->valEvenement['type'] == "incompletude") { |
if ($incompletude == FALSE OR $this->valEvenement['type'] == "incompletude") { |
1174 |
$valF['etat'] = $this->regle($row['regle_etat']); |
$valF['etat'] = $this->regle($row['regle_etat'], 'regle_etat'); |
1175 |
} else { |
} else { |
1176 |
$valF['etat_pendant_incompletude'] = $this->regle($row['regle_etat']); |
$valF['etat_pendant_incompletude'] = $this->regle($row['regle_etat'], 'regle_etat'); |
1177 |
} |
} |
1178 |
} |
} |
1179 |
if($this->valEvenement['evenement_suivant_tacite'] != '') { |
if($this->valEvenement['evenement_suivant_tacite'] != '') { |
1282 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
1283 |
// application des regles sur le courrier + delai |
// application des regles sur le courrier + delai |
1284 |
if(preg_match("/date_evenement/",$row['regle_date_limite'])){ |
if(preg_match("/date_evenement/",$row['regle_date_limite'])){ |
1285 |
$valF['date_limite']= $this->regle($row['regle_date_limite']); |
$valF['date_limite']= $this->regle($row['regle_date_limite'], 'regle_date_limite'); |
1286 |
} |
} |
1287 |
if(preg_match("/date_evenement/",$row['regle_date_complet'])){ |
if(preg_match("/date_evenement/",$row['regle_date_complet'])){ |
1288 |
$valF['date_complet']= $this->regle($row['regle_date_complet']); |
$valF['date_complet']= $this->regle($row['regle_date_complet'], 'regle_date_complet'); |
1289 |
} |
} |
1290 |
if(preg_match("/date_evenement/",$row['regle_date_dernier_depot'])){ |
if(preg_match("/date_evenement/",$row['regle_date_dernier_depot'])){ |
1291 |
$valF['date_dernier_depot']= $this->regle($row['regle_date_dernier_depot']); |
$valF['date_dernier_depot']= $this->regle($row['regle_date_dernier_depot'], 'regle_date_dernier_depot'); |
1292 |
} |
} |
1293 |
if(preg_match("/date_evenement/",$row['regle_date_notification_delai'])){ |
if(preg_match("/date_evenement/",$row['regle_date_notification_delai'])){ |
1294 |
$valF['date_notification_delai']= $this->regle($row['regle_date_notification_delai']); |
$valF['date_notification_delai']= $this->regle($row['regle_date_notification_delai'], 'regle_date_notification_delai'); |
1295 |
} |
} |
1296 |
if(preg_match("/date_evenement/",$row['regle_date_decision'])){ |
if(preg_match("/date_evenement/",$row['regle_date_decision'])){ |
1297 |
$valF['date_decision']= $this->regle($row['regle_date_decision']); |
$valF['date_decision']= $this->regle($row['regle_date_decision'], 'regle_date_decision'); |
1298 |
} |
} |
1299 |
if(preg_match("/date_evenement/",$row['regle_date_rejet'])){ |
if(preg_match("/date_evenement/",$row['regle_date_rejet'])){ |
1300 |
$valF['date_rejet']= $this->regle($row['regle_date_rejet']); |
$valF['date_rejet']= $this->regle($row['regle_date_rejet'], 'regle_date_rejet'); |
1301 |
} |
} |
1302 |
if(preg_match("/date_evenement/",$row['regle_date_validite'])){ |
if(preg_match("/date_evenement/",$row['regle_date_validite'])){ |
1303 |
$valF['date_validite']= $this->regle($row['regle_date_validite']); |
$valF['date_validite']= $this->regle($row['regle_date_validite'], 'regle_date_validite'); |
1304 |
} |
} |
1305 |
if(preg_match("/date_evenement/",$row['regle_date_chantier'])){ |
if(preg_match("/date_evenement/",$row['regle_date_chantier'])){ |
1306 |
$valF['date_chantier']= $this->regle($row['regle_date_chantier']); |
$valF['date_chantier']= $this->regle($row['regle_date_chantier'], 'regle_date_chantier'); |
1307 |
} |
} |
1308 |
if(preg_match("/date_evenement/",$row['regle_date_achevement'])){ |
if(preg_match("/date_evenement/",$row['regle_date_achevement'])){ |
1309 |
$valF['date_achevement']= $this->regle($row['regle_date_achevement']); |
$valF['date_achevement']= $this->regle($row['regle_date_achevement'], 'regle_date_achevement'); |
1310 |
} |
} |
1311 |
if(preg_match("/date_evenement/",$row['regle_date_conformite'])){ |
if(preg_match("/date_evenement/",$row['regle_date_conformite'])){ |
1312 |
$valF['date_conformite']= $this->regle($row['regle_date_conformite']); |
$valF['date_conformite']= $this->regle($row['regle_date_conformite'], 'regle_date_conformite'); |
1313 |
} |
} |
1314 |
} |
} |
1315 |
// Si des valeurs ont été calculées alors on met à jour l'enregistrement |
// Si des valeurs ont été calculées alors on met à jour l'enregistrement |
1347 |
$valNewInstr["evenement"] = $row['evenement_retour_signature']; |
$valNewInstr["evenement"] = $row['evenement_retour_signature']; |
1348 |
$valNewInstr["destinataire"] = $this->valF['destinataire']; |
$valNewInstr["destinataire"] = $this->valF['destinataire']; |
1349 |
$valNewInstr["dossier"] = $this->valF['dossier']; |
$valNewInstr["dossier"] = $this->valF['dossier']; |
1350 |
$valNewInstr["date_evenement"] = date("d/m/Y"); |
$valNewInstr["date_evenement"] = $this->f->formatDate($this->valF['date_retour_signature']); |
1351 |
$valNewInstr["date_envoi_signature"] = $this->f->formatDate($this->valF['date_envoi_signature']); |
$valNewInstr["date_envoi_signature"] = $this->f->formatDate($this->valF['date_envoi_signature']); |
1352 |
$valNewInstr["date_retour_signature"] = $this->f->formatDate($this->valF['date_retour_signature']); |
$valNewInstr["date_retour_signature"] = $this->f->formatDate($this->valF['date_retour_signature']); |
1353 |
$valNewInstr["date_envoi_rar"] = $this->f->formatDate($this->valF['date_envoi_rar']); |
$valNewInstr["date_envoi_rar"] = $this->f->formatDate($this->valF['date_envoi_rar']); |
1369 |
$valNewInstr["evenement"] = $row['evenement_retour_ar']; |
$valNewInstr["evenement"] = $row['evenement_retour_ar']; |
1370 |
$valNewInstr["destinataire"] = $this->valF['destinataire']; |
$valNewInstr["destinataire"] = $this->valF['destinataire']; |
1371 |
$valNewInstr["dossier"] = $this->valF['dossier']; |
$valNewInstr["dossier"] = $this->valF['dossier']; |
1372 |
$valNewInstr["date_evenement"] = date("d/m/Y"); |
$valNewInstr["date_evenement"] = $this->f->formatDate($this->valF['date_retour_rar']); |
1373 |
$valNewInstr["date_envoi_signature"] = $this->f->formatDate($this->valF['date_envoi_signature']); |
$valNewInstr["date_envoi_signature"] = $this->f->formatDate($this->valF['date_envoi_signature']); |
1374 |
$valNewInstr["date_retour_signature"] = $this->f->formatDate($this->valF['date_retour_signature']); |
$valNewInstr["date_retour_signature"] = $this->f->formatDate($this->valF['date_retour_signature']); |
1375 |
$valNewInstr["date_envoi_rar"] = $this->f->formatDate($this->valF['date_envoi_rar']); |
$valNewInstr["date_envoi_rar"] = $this->f->formatDate($this->valF['date_envoi_rar']); |
1575 |
$da->majDossierAutorisation(); |
$da->majDossierAutorisation(); |
1576 |
} |
} |
1577 |
|
|
|
// ============================================= |
|
|
// calcul de date avec ajout de mois (delais) |
|
|
// [add months (delay) and calculation final date] |
|
|
// LIMITE DE LA FONCTION si delai >24 MOIS |
|
|
// [limit : delay < 24 month] |
|
|
// ============================================= |
|
|
function moisdate($date,$delaimois) { |
|
|
$temp = explode("-" , $date); |
|
|
$jour = (int) $temp[2]; |
|
|
$mois = (int) $temp[1]; |
|
|
$annee = (int) $temp[0]; |
|
|
// calcul si delai superieur à 12 (limite 24) [delay > 24 month] |
|
|
if($delaimois>=12){ |
|
|
$delaimois=$delaimois-12; |
|
|
$annee=$annee+1; |
|
|
} |
|
|
if($delaimois>=12){ |
|
|
$delaimois=$delaimois-12; |
|
|
$annee=$annee+1; |
|
|
} |
|
|
// mois |
|
|
$mois=$mois+$delaimois; |
|
|
// calcul mois annee [calculation number of years if > 12 month] |
|
|
// nb de mois > à 12 |
|
|
if ($mois>12){ |
|
|
$mois=$mois-12; |
|
|
$annee=$annee+1; |
|
|
} |
|
|
// Calcul du nombre de jours dans le mois sélectionné [calculation number of days] |
|
|
switch($mois) { |
|
|
case "2": |
|
|
if ($annee % 4 == 0 && $annee % 100 != 0 || $annee % 400 == 0) |
|
|
$jourmax = 29; |
|
|
else |
|
|
$jourmax = 28; |
|
|
break; |
|
|
case "4": |
|
|
case "6": |
|
|
case "9": |
|
|
case "11": |
|
|
$jourmax = 30; |
|
|
break; |
|
|
default: |
|
|
$jourmax = 31; |
|
|
} |
|
|
if ($jour > $jourmax) |
|
|
$jour = $jourmax; |
|
|
//$dateretour=$annee."-".$mois."-".$jour; |
|
|
return $annee."-".$mois."-".$jour ; |
|
|
} |
|
|
|
|
1578 |
// Vérifie la restriction sur l'événement |
// Vérifie la restriction sur l'événement |
1579 |
function verifier($val = array(), &$db, $DEBUG){ |
function verifier($val = array(), &$db, $DEBUG){ |
1580 |
parent::verifier($val, $db, $DEBUG); |
parent::verifier($val, $db, $DEBUG); |
1765 |
} |
} |
1766 |
|
|
1767 |
//Mise à jour des données |
//Mise à jour des données |
1768 |
if ( $uid != '' || $uid == 'OP_FAILURE' ){ |
if ( $uid != '' && $uid != 'OP_FAILURE' ){ |
1769 |
// Logger |
// Logger |
1770 |
$this->addToLog("finaliser() - begin", EXTRA_VERBOSE_MODE); |
$this->addToLog("finaliser() - begin", EXTRA_VERBOSE_MODE); |
1771 |
// Recuperation de la valeur de la cle primaire de l'objet |
// Recuperation de la valeur de la cle primaire de l'objet |
2195 |
|
|
2196 |
} |
} |
2197 |
|
|
2198 |
|
/** |
2199 |
|
* Permet de vérifier qu'un événement est verrouillable |
2200 |
|
* @param integer $idx Identifiant de l'instruction |
2201 |
|
* @return boolean |
2202 |
|
*/ |
2203 |
|
function checkEvenementNonVerrouillable($idx) { |
2204 |
|
|
2205 |
|
// Initialisation du résultat |
2206 |
|
$non_verrouillable = false; |
2207 |
|
|
2208 |
|
// Si la condition n'est pas vide |
2209 |
|
if ($idx != "") { |
2210 |
|
|
2211 |
|
// Requête SQL |
2212 |
|
$sql = "SELECT evenement.non_verrouillable |
2213 |
|
FROM ".DB_PREFIXE."evenement |
2214 |
|
LEFT JOIN ".DB_PREFIXE."instruction |
2215 |
|
ON instruction.evenement = evenement.evenement |
2216 |
|
WHERE instruction.instruction = $idx"; |
2217 |
|
$this->f->addToLog("checkEvenementNonVerrouillable() : db->getOne(\"".$sql."\")", VERBOSE_MODE); |
2218 |
|
$res = $this->db->getOne($sql); |
2219 |
|
$this->f->isDatabaseError($res); |
2220 |
|
|
2221 |
|
// Si le retour de la requête est true |
2222 |
|
if ($res == 't') { |
2223 |
|
// |
2224 |
|
$non_verrouillable = true; |
2225 |
|
} |
2226 |
|
} |
2227 |
|
|
2228 |
|
// Retourne résultat |
2229 |
|
return $non_verrouillable; |
2230 |
|
} |
2231 |
|
|
2232 |
|
/** |
2233 |
|
* Mise à jour des champs archive_* |
2234 |
|
* @param mixed $row La ligne de données |
2235 |
|
*/ |
2236 |
|
public function updateArchiveData($row){ |
2237 |
|
|
2238 |
|
// Récupération de la valeur actuelle du délai, de l'accord tacite, |
2239 |
|
// de l'état et de l'avis du dossier d'instruction |
2240 |
|
$this->valF['archive_delai']=$row['delai']; |
2241 |
|
$this->valF['archive_accord_tacite']=$row['accord_tacite']; |
2242 |
|
$this->valF['archive_etat']=$row['etat']; |
2243 |
|
$this->valF['archive_avis']=$row['avis_decision']; |
2244 |
|
// Récupération de la valeur actuelle des 9 dates du dossier |
2245 |
|
// d'instruction |
2246 |
|
if ($row['date_complet'] != '') { |
2247 |
|
$this->valF['archive_date_complet']=$row['date_complet']; |
2248 |
|
} |
2249 |
|
if ($row['date_dernier_depot'] != '') { |
2250 |
|
$this->valF['archive_date_dernier_depot']=$row['date_dernier_depot']; |
2251 |
|
} |
2252 |
|
if ($row['date_rejet']!='') { |
2253 |
|
$this->valF['archive_date_rejet']= $row['date_rejet']; |
2254 |
|
} |
2255 |
|
if ($row['date_limite']!='') { |
2256 |
|
$this->valF['archive_date_limite']= $row['date_limite']; |
2257 |
|
} |
2258 |
|
if ($row['date_notification_delai']!='') { |
2259 |
|
$this->valF['archive_date_notification_delai']= $row['date_notification_delai']; |
2260 |
|
} |
2261 |
|
if ($row['date_decision']!='') { |
2262 |
|
$this->valF['archive_date_decision']= $row['date_decision']; |
2263 |
|
} |
2264 |
|
if ($row['date_validite']!='') { |
2265 |
|
$this->valF['archive_date_validite']= $row['date_validite']; |
2266 |
|
} |
2267 |
|
if ($row['date_achevement']!='') { |
2268 |
|
$this->valF['archive_date_achevement']= $row['date_achevement']; |
2269 |
|
} |
2270 |
|
if ($row['date_chantier']!='') { |
2271 |
|
$this->valF['archive_date_chantier']= $row['date_chantier']; |
2272 |
|
} |
2273 |
|
if ($row['date_conformite']!='') { |
2274 |
|
$this->valF['archive_date_conformite']= $row['date_conformite']; |
2275 |
|
} |
2276 |
|
if ($row['incompletude']!='') { |
2277 |
|
$this->valF['archive_incompletude']= $row['incompletude']; |
2278 |
|
} |
2279 |
|
if ($row['evenement_suivant_tacite']!='') { |
2280 |
|
$this->valF['archive_evenement_suivant_tacite']= $row['evenement_suivant_tacite']; |
2281 |
|
} |
2282 |
|
if ($row['evenement_suivant_tacite_incompletude']!='') { |
2283 |
|
$this->valF['archive_evenement_suivant_tacite_incompletude']= $row['evenement_suivant_tacite_incompletude']; |
2284 |
|
} |
2285 |
|
if ($row['etat_pendant_incompletude']!='') { |
2286 |
|
$this->valF['archive_etat_pendant_incompletude']= $row['etat_pendant_incompletude']; |
2287 |
|
} |
2288 |
|
if ($row['date_limite_incompletude']!='') { |
2289 |
|
$this->valF['archive_date_limite_incompletude']= $row['date_limite_incompletude']; |
2290 |
|
} |
2291 |
|
if ($row['delai_incompletude']!='') { |
2292 |
|
$this->valF['archive_delai_incompletude']= $row['delai_incompletude']; |
2293 |
|
} |
2294 |
|
if ($row['autorite_competente']!='') { |
2295 |
|
$this->valF['archive_autorite_competente']= $row['autorite_competente']; |
2296 |
|
} |
2297 |
|
if ($row['duree_validite']!='') { |
2298 |
|
$this->valF['duree_validite']= $row['duree_validite']; |
2299 |
|
} |
2300 |
|
} |
2301 |
}// fin classe |
}// fin classe |
2302 |
?> |
?> |