Skip to content

Commit

Permalink
Le message sur le dépassement du nombre maximal de jours à déposer su…
Browse files Browse the repository at this point in the history
…r le CET n'est plus bloquant. C'est juste un warning (Ticket GLPI 160901)
  • Loading branch information
pacomte-Paris1 committed Jan 29, 2024
1 parent 3e58da2 commit 14b66ae
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions html/gerer_cet_hors_esignature.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
$nocheck = $_POST["nocheck"];


$warnlog = "";
$msg_erreur = "";

require ("includes/menu.php");
Expand Down Expand Up @@ -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 . "<br/>";
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 <br>";
$msg_erreur = $cet->store();
// echo "Apres le store <br>";
// $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 <br>";
$msg_erreur = $cet->store();
// echo "Apres le store <br>";
// }
}
// 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 == "") {
Expand Down Expand Up @@ -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 <br>";
Expand Down

0 comments on commit 14b66ae

Please sign in to comment.