From a9a8e9a73ce981e44aeac7b75ad834256e7f3265 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/fichinter/card.php | 8 ++++---- htdocs/holiday/card.php | 1 - htdocs/holiday/class/holiday.class.php | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 77c7e17ffb5..4ffc31c9cab 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -748,10 +748,10 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=$langs->transnoentities("InterventionSentByEMail",$object->ref); } 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'; }