Merge pull request #12246 from mapiolca/patch-12

Fix Multicompany Filter
This commit is contained in:
Laurent Destailleur 2019-11-04 21:01:26 +01:00 committed by GitHub
commit 2047f50b10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,6 +220,7 @@ if ($socid > 0) $sql.= ' AND s.rowid = '.$socid;
if (!$user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$sql.= " AND f.fk_statut NOT IN (" . implode(', ', $invoice_status_except_list) . ")";
$sql.= ' AND s.entity IN ('.getEntity('societe').')';
$sql.= ' AND f.entity IN ('.getEntity('invoice').')';
$sql.= " AND d.fk_facture = f.rowid";
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
if(! empty($TSelectedProducts)) {