Update api_thirdparties.class.php
This commit is contained in:
parent
d56785e9dc
commit
47069a0575
@ -133,8 +133,8 @@ class Thirdparties extends DolibarrApi
|
|||||||
}
|
}
|
||||||
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st";
|
$sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||||
$sql .= " WHERE t.fk_stcomm = st.id";
|
$sql .= " WHERE t.entity IN ('.getEntity('societe').')";
|
||||||
$sql .= ' AND t.entity IN ('.getEntity('societe').')';
|
$sql .= " AND t.fk_stcomm = st.id";
|
||||||
|
|
||||||
if ($mode == 1) $sql .= " AND t.client IN (1, 3)";
|
if ($mode == 1) $sql .= " AND t.client IN (1, 3)";
|
||||||
if ($mode == 2) $sql .= " AND t.client IN (2, 3)";
|
if ($mode == 2) $sql .= " AND t.client IN (2, 3)";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user