diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 0e7818f6168..70692286b0a 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -164,8 +164,6 @@ if (empty($reshook)) { if ($result < 0) { setEventMessages($holiday->error, $holiday->errors, 'errors'); $error++; - } elseif ($result == 0) { - setEventMessages($langs->trans("HolidayQtyNotModified", $user->login), null, 'warnings'); } // Update of the days of the employee @@ -191,6 +189,10 @@ if (empty($reshook)) { } } + if (!$error && !$nbok) { + setEventMessages($langs->trans("HolidayQtyNotModified", $user->login), null, 'warnings'); + } + if (!$error) { $db->commit();