Fix: multicompany sharings and uniformize code

This commit is contained in:
Regis Houssin
2012-02-11 10:18:09 +01:00
parent 645d72c4a6
commit cd3452d71d
41 changed files with 159 additions and 142 deletions

View File

@@ -756,8 +756,8 @@ class Livraison extends CommonObject
$prodids = array();
$sql = "SELECT rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."product";
$sql.= " WHERE tosell = 1";
$sql.= " AND entity = ".$conf->entity;
$sql.= " WHERE entity IN (".getEntity('product', 1).")";
$sql.= " AND tosell = 1";
$resql = $this->db->query($sql);
if ($resql)
{
@@ -866,7 +866,7 @@ class Livraison extends CommonObject
else
{
$this->error=$this->db->error()." - sql=$sqlSourceLine";
dol_syslog("livraison.class.php::getRemainingDelivered ".$this->error, LOG_ERR);
dol_syslog(get_class($this)."::getRemainingDelivered ".$this->error, LOG_ERR);
return -1;
}
}