This commit is contained in:
Frédéric FRANCE
2023-08-27 09:19:58 +02:00
committed by GitHub
parent 388d5ef3d4
commit a142d48d26

View File

@@ -642,7 +642,7 @@ class Receptions extends DolibarrApi
throw new RestException(404, 'Reception not found');
}
if (!DolibarrApi::_checkAccessToResource('reception', $this->commande->id)) {
if (!DolibarrApi::_checkAccessToResource('reception', $this->reception->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
@@ -651,7 +651,7 @@ class Receptions extends DolibarrApi
throw new RestException(304, 'Error nothing done. May be object is already closed');
}
if ($result < 0) {
throw new RestException(500, 'Error when closing Order: '.$this->commande->error);
throw new RestException(500, 'Error when closing Reception: '.$this->reception->error);
}
// Reload reception