Added @throws annotations for possible exceptions

This commit is contained in:
Jean Traullé 2019-08-15 15:29:37 +02:00
parent f37b8c78c8
commit 6edf5494c3
No known key found for this signature in database
GPG Key ID: 5315BC7C950D912A

View File

@ -184,7 +184,9 @@ class BankAccounts extends DolibarrApi
* @status 201
*
* @throws 401 Unauthorized: User does not have permission to configure bank accounts
* @throws 404 Not Found: Either the source or the destination bankaccount for the provided id does not exist
* @throws 422 Unprocessable Entity: Refer to detailed exception message for the cause
* @throws 500 Internal Server Error: Error(s) returned by the RDBMS
*/
public function transfer($bankaccount_from_id = 0, $bankaccount_to_id = 0, $date = null, $description = "", $amount = 0.0, $amount_to = 0.0)
{
@ -283,7 +285,7 @@ class BankAccounts extends DolibarrApi
$error++;
}
if (! $error)
if (!$error)
{
$this->db->commit();