Fix number of tasks on dashboard always zero

This commit is contained in:
Tobias Sekan 2019-11-21 08:29:47 +01:00 committed by GitHub
parent 190dd6b1e9
commit f6c5605fd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1985,7 +1985,7 @@ class Task extends CommonObject
$sql .= " WHERE p.entity IN (".getEntity('project', 0).')';
$sql .= " AND p.fk_statut = 1";
$sql .= " AND t.fk_projet = p.rowid";
$sql .= " AND t.progress < 100"; // tasks to do
$sql .= " AND (t.progress IS NULL OR t.progress < 100)"; // tasks to do
if (!$user->rights->projet->all->lire) $sql .= " AND p.rowid IN (".$projectsListId.")";
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";