Merge pull request #36546 from defrance/patch-835467
Update holiday api methods from setValidate/setApproved to validate/a…
This commit is contained in:
commit
7f6737845e
1 changed files with 3 additions and 2 deletions
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2020-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 William Mead <william@m34d.com>
|
||||
* Copyright (C) 2025 Charlene Benke <charlene@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -365,7 +366,7 @@ class Holidays extends DolibarrApi
|
|||
throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->holiday->setValidate(DolibarrApiAccess::$user, $notrigger);
|
||||
$result = $this->holiday->validate(DolibarrApiAccess::$user, $notrigger);
|
||||
if ($result == 0) {
|
||||
throw new RestException(304, 'Error nothing done. May be object is already validated');
|
||||
}
|
||||
|
|
@ -410,7 +411,7 @@ class Holidays extends DolibarrApi
|
|||
throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->holiday->setApproved(DolibarrApiAccess::$user, $notrigger);
|
||||
$result = $this->holiday->approve(DolibarrApiAccess::$user, $notrigger);
|
||||
if ($result == 0) {
|
||||
throw new RestException(304, 'Error nothing done. May be object is already approved');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue