Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0
This commit is contained in:
commit
fe123327bc
3 changed files with 6 additions and 5 deletions
|
|
@ -272,12 +272,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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ abstract class CommonObject
|
|||
public $fk_delivery_address;
|
||||
|
||||
/**
|
||||
* @var int Shipping method ID
|
||||
* @var ?int Shipping method ID
|
||||
* @see setShippingMethod()
|
||||
*/
|
||||
public $shipping_method_id;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue