Merge pull request #22978 from ATM-Nicolas/fix_bankaccount_api

FIX : Bankaccounts API fetch with 'id' and 'socid'
This commit is contained in:
Laurent Destailleur 2022-11-25 22:18:02 +01:00 committed by GitHub
commit 2ce4e1d125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,7 +217,7 @@ class CompanyBankAccount extends Account
if ($id) {
$sql .= " WHERE rowid = ".((int) $id);
}
if ($socid) {
elseif ($socid) {
$sql .= " WHERE fk_soc = ".((int) $socid);
if ($default > -1) {
$sql .= " AND default_rib = ".((int) $default);