Update api_orders.class.php

This commit is contained in:
Cédric 2020-12-03 16:02:49 +01:00 committed by GitHub
parent dcc3ecf012
commit 2751d5cefd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -622,13 +622,7 @@ class Orders extends DolibarrApi
if ($this->commande->availability($this->commande->availability_id) < 0)
throw new RestException(400, 'Error while updating availability');
}
// Update demand reason
if (!empty($this->commande->demand_reason_id) && $this->commande->demand_reason_id > 0) {
if ($this->commande->demand_reason($this->commande->demand_reason_id) < 0)
throw new RestException(400, 'Error while updating demand reason');
}
if ($this->commande->update(DolibarrApiAccess::$user) > 0)
{
return $this->get($id);