From 3313e34797c88100c745550f799abc2ec200780a Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Sat, 9 Aug 2025 17:30:28 +0200 Subject: [PATCH] Fix deprecated var --- htdocs/compta/bank/class/api_bankaccounts.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php index 3c28de3b117..7dafb7ece06 100644 --- a/htdocs/compta/bank/class/api_bankaccounts.class.php +++ b/htdocs/compta/bank/class/api_bankaccounts.class.php @@ -162,7 +162,7 @@ class BankAccounts extends DolibarrApi throw new RestException(403); } // Check mandatory fields - $result = $this->_validate($request_data); + $this->_validate($request_data); $account = new Account($this->db); // Date of the initial balance (required to create an account). @@ -179,6 +179,7 @@ class BankAccounts extends DolibarrApi // courant and type are the same thing but the one used when // creating an account is courant $account->courant = $account->type; // deprecated + $account->type = $account->type; if ($account->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error creating bank account', array_merge(array($account->error), $account->errors)); @@ -620,8 +621,6 @@ class BankAccounts extends DolibarrApi */ public function getLinks($id, $line_id) { - $list = array(); - if (!DolibarrApiAccess::$user->hasRight('banque', 'lire')) { throw new RestException(403); }