diff --git a/App/Helpers/Formatter.php b/App/Helpers/Formatter.php index f1c001714..63bacb954 100644 --- a/App/Helpers/Formatter.php +++ b/App/Helpers/Formatter.php @@ -104,7 +104,7 @@ public static function timestamp2Duree($timestamp) $heures = abs($timestamp/3600); $duree = sprintf('%02d:%02d', $heures, $secondes); - return (0 < $timestamp) + return (0 <= $timestamp) ? $duree : '-' . $duree ; diff --git a/App/ProtoControllers/Employe/AHeure.php b/App/ProtoControllers/Employe/AHeure.php index f5a04c218..8ed886bff 100644 --- a/App/ProtoControllers/Employe/AHeure.php +++ b/App/ProtoControllers/Employe/AHeure.php @@ -311,7 +311,9 @@ protected function transformChampsRecherche(array $post) $champs['timestampDebut'] = \utilisateur\Fonctions::getTimestampPremierJourAnnee($value); $champs['timestampFin'] = \utilisateur\Fonctions::getTimestampDernierJourAnnee($value); } else { - $champs[$key] = (int) $value; + if ($value !== "all") { // si la valeur est différent de "all" le paramètres est passé au champ pour la futur requête sql + $champs[$key] = (int) $value; + } } } diff --git a/App/ProtoControllers/Employe/Conge.php b/App/ProtoControllers/Employe/Conge.php index c3c81cb5e..1fbd328a7 100644 --- a/App/ProtoControllers/Employe/Conge.php +++ b/App/ProtoControllers/Employe/Conge.php @@ -21,14 +21,14 @@ class Conge public function getListe() { $return = ''; - $errorsLst=[]; - if($_SESSION['config']['where_to_find_user_email']=="ldap"){ - include_once CONFIG_PATH .'config_ldap.php'; + $errorsLst = []; + if ($_SESSION['config']['where_to_find_user_email'] == "ldap") { + include_once CONFIG_PATH . 'config_ldap.php'; } - if(!empty($_POST) && !$this->isSearch($_POST)) { + if (!empty($_POST) && !$this->isSearch($_POST)) { if (0 < (int) \utilisateur\Fonctions::postDemandeCongesHeure($_POST, $errorsLst)) { - $return .= '