diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 0133135b05e..cfd47355e6b 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -898,7 +898,7 @@ class Holiday extends CommonObject if ($checkBalance > 0) { $balance = $this->getCPforUser($this->fk_user, $this->fk_type); - $days = num_public_holiday($this->date_debut, $this->date_fin); + $days = num_open_day($this->date_debut, $this->date_fin); if ((($balance - $days) < 0) && getDolGlobalString('HOLIDAY_DISALLOW_NEGATIVE_BALANCE')) { $this->error = 'LeaveRequestCreationBlockedBecauseBalanceIsNegative';