Set holiday status to approved before approval
This commit is contained in:
parent
da6dfebc70
commit
34f78f581b
1 changed files with 1 additions and 0 deletions
|
|
@ -412,6 +412,7 @@ class Holidays extends DolibarrApi
|
|||
throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$this->holiday->status = Holiday::STATUS_APPROVED;
|
||||
$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