mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-12 10:52:37 +01:00
Keep same behaviour by default.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user