From 667f1bf49794e7ebae7dfd50020d5cd3d2b8df0d Mon Sep 17 00:00:00 2001 From: Andrelec1 Date: Mon, 17 Nov 2014 14:55:22 +0100 Subject: [PATCH] Fix : more than 1000 holidays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Si il y a plus de 1000 jours de congés, le délimiteur des millier fais bugger les calcule ... --- htdocs/holiday/card.php | 1 - htdocs/holiday/class/holiday.class.php | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 31a4e40599f..bbffe26cf9c 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -761,7 +761,6 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create print ''; } else print $form->select_users(GETPOST('userid')?GETPOST('userid'):$user->id,'userid',0,'',0); - //var_dump($cp->getConfCP('nbHolidayDeducted')); $nb_holiday = $cp->getCPforUser($user->id) / $cp->getConfCP('nbHolidayDeducted'); print '   '.$langs->trans('SoldeCPUser', round($nb_holiday,2)).''; print ''; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 5381c99df07..2ecf8edfce3 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1045,7 +1045,8 @@ class Holiday extends CommonObject $result = $this->db->query($sql); if($result) { $obj = $this->db->fetch_object($result); - return number_format($obj->nb_holiday,2); + //return number_format($obj->nb_holiday,2); + return $obj->nb_holiday; } else { return '0'; }