This commit is contained in:
Laurent Destailleur 2025-12-15 15:41:23 +01:00
parent 4c092da9d6
commit dc14e43e5d

View file

@ -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';