mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
FIX Filter on category tag for suppliers
This commit is contained in:
@@ -359,7 +359,7 @@ $sql.= " ,".MAIN_DB_PREFIX."c_stcomm as st";
|
||||
// We'll need this table joined to the select in order to filter by sale
|
||||
if ($search_sale || (!$user->rights->societe->client->voir && !$socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
// We'll need this table joined to the select in order to filter by categ
|
||||
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs";
|
||||
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_".($type=='f'?"fournisseur":"societe")." as cs";
|
||||
$sql.= " WHERE s.fk_stcomm = st.id";
|
||||
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
|
||||
Reference in New Issue
Block a user