From c24a958fc8aa8e33e985b318525b7ca98af47fbb Mon Sep 17 00:00:00 2001 From: Christian Humpel Date: Thu, 15 Dec 2022 20:34:23 +0100 Subject: [PATCH] Fix_#23239_API_Filter_for_ExtraFields --- htdocs/societe/class/api_thirdparties.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index db7eec3096e..c4781c0df6a 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -150,6 +150,7 @@ class Thirdparties extends DolibarrApi $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 .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields if ($category > 0) { if ($mode != 4) { $sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c";