X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2FttChartHelper.class.php;h=7e58ca0963940e74ad763a55b1c33b7c630d0a8e;hb=cb8e3de960b758147b34d8323054e7de70548619;hp=155349beccbf975c870939981c21a3887e7087f7;hpb=993450e17195b87dc406c3135ee22dafe9b825fb;p=timetracker.git diff --git a/WEB-INF/lib/ttChartHelper.class.php b/WEB-INF/lib/ttChartHelper.class.php index 155349be..7e58ca09 100644 --- a/WEB-INF/lib/ttChartHelper.class.php +++ b/WEB-INF/lib/ttChartHelper.class.php @@ -70,14 +70,14 @@ class ttChartHelper { if (CHART_PROJECTS == $ch_type) { // Data for projects. $sql = "select p.name as name, sum(time_to_sec(l.duration)) as time from tt_log l - inner join tt_projects p on (p.id = l.project_id) + left join tt_projects p on (p.id = l.project_id) where l.status = 1 and l.duration > 0 and l.user_id = $user_id $q_period group by l.project_id"; - } else if (CHART_TASKS == $ch_type) { + } elseif (CHART_TASKS == $ch_type) { // Data for tasks. $sql = "select t.name as name, sum(time_to_sec(l.duration)) as time from tt_log l - inner join tt_tasks t on (t.id = l.task_id) + left join tt_tasks t on (t.id = l.task_id) where l.status = 1 and l.duration > 0 and l.user_id = $user_id $q_period group by l.task_id"; - } else if (CHART_CLIENTS == $ch_type) { + } elseif (CHART_CLIENTS == $ch_type) { // Data for clients. $sql = "select coalesce(c.name, 'NULL') as name, sum(time_to_sec(l.duration)) as time from tt_log l left join tt_clients c on (c.id = l.client_id)