2
0
forked from Wavyzz/dolibarr

Merge pull request #10323 from mapiolca/patch-7

FIX Multicompany
This commit is contained in:
Laurent Destailleur
2019-01-10 14:04:30 +01:00
committed by GitHub

View File

@@ -144,7 +144,7 @@ if ($id > 0 || ! empty($ref))
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.fk_statut > 0";
$sql.= " AND s.entity = ".$conf->entity;
$sql.= " AND f.entity IN (".getEntity('invoice').");
$sql.= " AND d.fk_facture = f.rowid";
$sql.= " AND d.fk_product =".$object->id;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;