diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 83d9053a7fa..a4bd7d4a5c3 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1131,7 +1131,7 @@ class Thirdparties extends DolibarrApi $account->fetchFromApi($bankaccount_id, $id); - if($account->socid != $bankaccount_id){ + if($account->socid != $id){ throw new RestException(401); }