From 786905a6c8b341e9d52ec356fce9aab0bec35b63 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 10 Oct 2024 09:16:32 +0200 Subject: [PATCH] Fix: Does not filter correctly by project contacts --- htdocs/core/lib/company.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 411fe6d0663ab..9a1ea12d88fd0 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -10,7 +10,7 @@ * Copyright (C) 2015-2024 Frédéric France * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2017 Rui Strecht - * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2018-2024 Ferran Marcet * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -1026,7 +1026,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc on ec.fk_c_type_contact = tc.rowid"; $sql .= " WHERE sc.fk_soc = ".((int) $object->id); $sql .= " AND p.entity IN (".getEntity('project').")"; - $sql .= " AND tc.element = 'project'"; + $sql .= " AND tc.element = 'project' AND tc.source = 'external'"; $sql .= " ORDER BY p.dateo DESC"; $result = $db->query($sql);