From 78c5011a7113288ce63fa538feb22770f8204e90 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 15 Apr 2020 16:20:42 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/societe/class/api_thirdparties.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index cc4bc16ae47..3bf0749ca4d 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -128,24 +128,24 @@ 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) $sql .= " FROM ".MAIN_DB_PREFIX."societe as t"; 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 $sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st"; $sql .= " WHERE t.fk_stcomm = st.id"; $sql .= ' AND t.entity IN ('.getEntity('societe').')'; - + if ($mode == 1) $sql .= " AND t.client IN (1, 3)"; if ($mode == 2) $sql .= " AND t.client IN (2, 3)"; if ($mode == 3) $sql .= " AND t.client IN (0)"; if ($mode == 4) $sql .= " AND t.fournisseur IN (1)"; - + // Select products of given category if ($category > 0) { - $sql .= " AND c.fk_categorie = ".$db->escape($category); - $sql .= " AND c.fk_soc = t.rowid "; + $sql .= " AND c.fk_categorie = ".$db->escape($category); + $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 ($email != NULL) $sql.= " AND s.email = \"".$email."\""; if ($socids) $sql .= " AND t.rowid IN (".$socids.")";