Skip to content
Snippets Groups Projects
Commit ab6a6705 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #1516 from marcosgdf/multicompany-fixes

Fixed a problem with bank accounts sharing across entities
parents ae728645 e6bd3921
No related branches found
No related tags found
No related merge requests found
......@@ -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)."'";
......
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment