2
0
forked from Wavyzz/dolibarr

FIX Duplicate warning message

This commit is contained in:
Laurent Destailleur
2023-08-01 13:55:33 +02:00
parent 9482ae5215
commit 6ddee88615

View File

@@ -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();