Update api_orders.class.php

This commit is contained in:
Laurent Destailleur 2017-11-14 01:21:06 +01:00 committed by GitHub
parent bf05a0b8e0
commit 4212000caf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -493,10 +493,10 @@ class Orders extends DolibarrApi
$result = $this->commande->valid(DolibarrApiAccess::$user, $idwarehouse, $notrigger);
if ($result == 0) {
throw new RestException(500, 'Error nothing done. May be object is already validated');
throw new RestException(304, 'Error nothing done. May be object is already validated');
}
if ($result < 0) {
throw new RestException(304, 'Error when validating Order: '.$this->commande->error);
throw new RestException(500, 'Error when validating Order: '.$this->commande->error);
}
$result = $this->commande->fetch($id);
if( ! $result ) {