diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 0c12b5e437a..4bdbb7a0587 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -613,7 +613,7 @@ class Account extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON ba.fk_pays = p.rowid'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON ba.state_id = d.rowid'; - $sql.= " WHERE entity = ".$conf->entity; + $sql.= " WHERE entity IN (".getEntity('bank_account', 1).')'; if ($id) $sql.= " AND ba.rowid = ".$id; if ($ref) $sql.= " AND ba.ref = '".$this->db->escape($ref)."'"; diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index 51b7a4dc818..87369430f45 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -59,7 +59,7 @@ $accounts = array(); $sql = "SELECT rowid, courant, rappro"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; -$sql.= " WHERE entity = ".$conf->entity; +$sql.= " WHERE entity IN (".getEntity('bank_account', 1).')'; if ($statut != 'all') $sql.= " AND clos = 0"; $sql.= $db->order('label', 'ASC');