From 14b66ae47662ffd0d3e6e16af4d7c76a5008ff38 Mon Sep 17 00:00:00 2001 From: Pascal Comte Date: Mon, 29 Jan 2024 11:03:25 +0100 Subject: [PATCH] =?UTF-8?q?Le=20message=20sur=20le=20d=C3=A9passement=20du?= =?UTF-8?q?=20nombre=20maximal=20de=20jours=20=C3=A0=20d=C3=A9poser=20sur?= =?UTF-8?q?=20le=20CET=20n'est=20plus=20bloquant.=20C'est=20juste=20un=20w?= =?UTF-8?q?arning=20(Ticket=20GLPI=20160901)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/gerer_cet_hors_esignature.php | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/html/gerer_cet_hors_esignature.php b/html/gerer_cet_hors_esignature.php index 0de05ec..cdfefcf 100644 --- a/html/gerer_cet_hors_esignature.php +++ b/html/gerer_cet_hors_esignature.php @@ -87,6 +87,7 @@ $nocheck = $_POST["nocheck"]; + $warnlog = ""; $msg_erreur = ""; require ("includes/menu.php"); @@ -187,19 +188,21 @@ // 20 jours obligatoires // Base de calcul = 45 jours // ==> 45 - 20 = 25 jours maxi + // Suite ticket 160901 => Le message n'est plus bloquant. C'est juste un warning if ($cumul > 25) { - $errlog = "Le nombre de jour de cumul annuel est supérieur à 25. Vous ne pouvez pas mettre autant de jours dans le CET. "; - $msg_erreur .= $errlog . "
"; - error_log(basename(__FILE__) . " uid : " . $agentid . " : " . $fonctions->stripAccents($errlog)); - } else { - $cet->cumulannuel($fonctions->anneeref(), $cumul); - $cumul = ($cet->cumultotal()); - $cumul = $cumul + $nbr_jours_cet; - $cet->cumultotal($cumul); - // echo "Avant le store
"; - $msg_erreur = $cet->store(); - // echo "Apres le store
"; +// $warnlog = "Le nombre de jour de cumul annuel est supérieur à 25. Vous ne pouvez pas mettre autant de jours dans le CET. "; + $warnlog = "INFORMATION : Le nombre de jours de cumul annuel est supérieur à 25."; + error_log(basename(__FILE__) . " uid : " . $agentid . " : " . $fonctions->stripAccents($warnlog)); +// } else { } + $cet->cumulannuel($fonctions->anneeref(), $cumul); + $cumul = ($cet->cumultotal()); + $cumul = $cumul + $nbr_jours_cet; + $cet->cumultotal($cumul); + // echo "Avant le store
"; + $msg_erreur = $cet->store(); + // echo "Apres le store
"; +// } } // Si tout s'est bien passé dans le store du CET (création d'un nouveau CET ou ajout de jour dans un CET existant) if ($msg_erreur == "") { @@ -266,6 +269,10 @@ error_log(basename(__FILE__) . " " . $msg_erreur); $msg_erreur = ""; } + else if ($warnlog != "") + { + echo $fonctions->showmessage(fonctions::MSGWARNING, "$warnlog"); + } if (! is_null($agent)) { // echo "On a choisit un agent
";