Skip to content

Commit

Permalink
Fix: Does not filter correctly by project contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarcet committed Oct 10, 2024
1 parent f1cd746 commit 786905a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/lib/company.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Copyright (C) 2015-2024 Frédéric France <[email protected]>
* Copyright (C) 2015 Raphaël Doursenaud <[email protected]>
* Copyright (C) 2017 Rui Strecht <[email protected]>
* Copyright (C) 2018 Ferran Marcet <[email protected]>
* Copyright (C) 2018-2024 Ferran Marcet <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 786905a

Please sign in to comment.