From f90e121650c8f75a3e284e74029e84d2822d4c7c Mon Sep 17 00:00:00 2001 From: atm-lucas <121817516+atm-lucasmantegari@users.noreply.github.com> Date: Sat, 14 Mar 2026 18:31:50 +0100 Subject: [PATCH] You cannot cancel leave if the balance is negative (#37492) --- htdocs/holiday/class/holiday.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 3dd88335641..44e12602ffa 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -988,7 +988,7 @@ class Holiday extends CommonObject $checkBalance = getDictionaryValue('c_holiday_types', 'block_if_negative', $this->fk_type); - if ($checkBalance > 0 && $this->statut != self::STATUS_DRAFT) { + if ($checkBalance > 0 && $this->statut != self::STATUS_DRAFT && $this->statut != self::STATUS_CANCELED) { $balance = $this->getCPforUser($this->fk_user, $this->fk_type); if ($balance < 0) {