bad setting on get_entity fournisseur

This commit is contained in:
BENKE Charlie 2016-10-26 16:59:58 +02:00 committed by GitHub
parent 0847dba26d
commit 632fe49fb9

View File

@ -2014,7 +2014,7 @@ class Product extends CommonObject
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE c.rowid = cd.fk_commande";
$sql.= " AND c.fk_soc = s.rowid";
$sql.= " AND c.entity IN (".getEntity('commande_fourniseur', 1).")";
$sql.= " AND c.entity IN (".getEntity('commande_fournisseur', 1).")";
$sql.= " AND cd.fk_product = ".$this->id;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($socid > 0) $sql.= " AND c.fk_soc = ".$socid;