diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 843dd141a40..a661211b242 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -899,7 +899,7 @@ class Holiday extends CommonObject $balance = $this->getCPforUser($this->fk_user, $this->fk_type); $days = num_between_day($this->date_debut, $this->date_fin); - if ($balance - $days < 0 && !getDolGlobalString('HOLIDAY_ALLOW_NEGATIVE_BALANCE')) { + if ($balance - $days < 0 && getDolGlobalString('HOLIDAY_DISALLOW_NEGATIVE_BALANCE')) { $this->error = 'LeaveRequestCreationBlockedBecauseBalanceIsNegative'; return -1; }