From 4d6372dda12f9c36c00c1901fb0c9f529f7a8ab1 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Fri, 16 Jul 2021 12:10:25 +0200 Subject: [PATCH] FIX: holiday balances: revert part of commit 1e7df0ba9 to still increment on page visit --- htdocs/holiday/define_holiday.php | 4 ++++ htdocs/holiday/list.php | 3 +++ htdocs/hrm/index.php | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index fcb8b73d486..b3d2c25adda 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -193,6 +193,10 @@ llxHeader('', $langs->trans('CPTitreMenu')); $typeleaves = $holiday->getTypes(1, 1); +$result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user. +if ($result < 0) { + setEventMessages($holiday->error, $holiday->errors, 'errors'); +} print '