From 70f7a21ad17a9b00da3602673f8f4d4b6cb4b574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 9 Dec 2025 21:04:23 +0100 Subject: [PATCH 1/3] Update commonobject.class.php with same phpdoc than in develop --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index a0489c76653..a5a863a7573 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -491,7 +491,7 @@ abstract class CommonObject public $fk_delivery_address; /** - * @var int Shipping method ID + * @var ?int Shipping method ID * @see setShippingMethod() */ public $shipping_method_id; From 06f29c559e6c918362cca25ecce9b5f97a5bf278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 9 Dec 2025 21:23:31 +0100 Subject: [PATCH 2/3] Update propal.class.php --- htdocs/comm/propal/class/propal.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 0a32b3e3118..66bcc96ab16 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -270,12 +270,12 @@ class Propal extends CommonObject public $address; /** - * @var int availability ID + * @var ?int availability ID can be null in db */ public $availability_id; /** - * @var int availability ID + * @var ?int availability ID * @deprecated * @see $availability_id */ From 365c5b1015422b20ab272d70d31e0799c5de78f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Dec 2025 00:50:37 +0100 Subject: [PATCH 3/3] Fix test on negative balance --- htdocs/holiday/class/holiday.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index a661211b242..9bcbb6c2f7d 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -898,8 +898,9 @@ class Holiday extends CommonObject if ($checkBalance > 0) { $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_DISALLOW_NEGATIVE_BALANCE')) { + $days = num_public_holiday($this->date_debut, $this->date_fin); + + if ((($balance - $days) < 0) && getDolGlobalString('HOLIDAY_DISALLOW_NEGATIVE_BALANCE')) { $this->error = 'LeaveRequestCreationBlockedBecauseBalanceIsNegative'; return -1; }