Fix: compatibility with multicompany transverse mode

This commit is contained in:
Regis Houssin
2012-09-07 17:16:47 +02:00
parent ab5e4db9c0
commit 5270ec06cb
9 changed files with 65 additions and 43 deletions

View File

@@ -72,10 +72,13 @@ class ModeleBoxes // Can't be abtract as it is instanciated to build "empty"
*/
function fetch($rowid)
{
global $conf;
// Recupere liste des boites d'un user si ce dernier a sa propre liste
$sql = "SELECT b.rowid, b.box_id, b.position, b.box_order, b.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."boxes as b";
$sql.= " WHERE b.rowid = ".$rowid;
$sql.= " WHERE b.entity = ".$conf->entity;
$sql.= " AND b.rowid = ".$rowid;
dol_syslog(get_class($this)."::fetch rowid=".$rowid);
$resql = $this->db->query($sql);