X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/840056890d9b574fcc62fdf386db346f133baa91..f2b99f6c76ea5684968ac22300c98eae0777f540:/WEB-INF/lib/ttTimesheetHelper.class.php diff --git a/WEB-INF/lib/ttTimesheetHelper.class.php b/WEB-INF/lib/ttTimesheetHelper.class.php index a348cb57..c2841c88 100644 --- a/WEB-INF/lib/ttTimesheetHelper.class.php +++ b/WEB-INF/lib/ttTimesheetHelper.class.php @@ -440,9 +440,8 @@ class ttTimesheetHelper { if ($options['show_cost'] && $user->isPluginEnabled('ex')) return false; // Parts for client and project. - if ($options['client_id']) $client_part = ' and client_id = '.(int)$options['client_id']; - if ($options['project_id']) $project_part = ' and project_id = '.(int)$options['project_id']; - // TODO: test and fix the above for NULL client and project ids... + if ($options['client_id']) $client_part = ' and (client_id is null or client_id = '.(int)$options['client_id'].')'; + if ($options['project_id']) $project_part = ' and (project_id is null or project_id = '.(int)$options['project_id'].')'; // Determine start and end dates. $dateFormat = $user->getDateFormat();