Fixing style errors.

This commit is contained in:
stickler-ci 2020-04-15 16:20:42 +00:00
parent 864205771b
commit 78c5011a71

View File

@ -128,7 +128,7 @@ class Thirdparties extends DolibarrApi
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
$sql .= " FROM ".MAIN_DB_PREFIX."societe as t"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as t";
if ($category > 0) { if ($category > 0) {
$sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c"; $sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c";
} }
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";
@ -142,8 +142,8 @@ class Thirdparties extends DolibarrApi
// Select products of given category // Select products of given category
if ($category > 0) { if ($category > 0) {
$sql .= " AND c.fk_categorie = ".$db->escape($category); $sql .= " AND c.fk_categorie = ".$db->escape($category);
$sql .= " AND c.fk_soc = t.rowid "; $sql .= " AND c.fk_soc = t.rowid ";
} }
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc";