X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/e4ddcc8ecb86ac997048d648ed82402eff2cbb4a..69f1f97814697d70aa31902ef35add23536baa60:/WEB-INF/lib/ttReportHelper.class.php diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index a3b0b0d8..811312ae 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -299,15 +299,15 @@ class ttReportHelper { $sql = "($sql) union all ($sql_for_expense_items)"; } -// TODO: refactoring in progress down from here... The above is identical to getFavItems and is ready to merge. -// Note: this sort part below is different in getFavItems. Need to figure out why and fix properly. - // Determine sort part. $sort_part = ' order by '; - if ('no_grouping' == $group_by_option || 'date' == $group_by_option) + if ($group_by_option == null || 'no_grouping' == $group_by_option || 'date' == $group_by_option) $sort_part .= 'date'; else $sort_part .= $group_by_option.', date'; + +// TODO: refactoring in progress down from here... The above is identical to getFavItems and is ready to merge. +// Note: this sort part below is different in getFavItems. Need to figure out why and fix properly. if (($canViewReports || $isClient) && is_array($bean->getAttribute('users')) && 'user' != $group_by_option) $sort_part .= ', user, type'; if ($bean->getAttribute('chstart')) @@ -576,7 +576,7 @@ class ttReportHelper { // Determine sort part. $sort_part = ' order by '; - if ($group_by_option == null || 'no_grouping' == $group_by_option || 'date' == $group_by_option) // TODO: fix DB for NULL values in group_by field. + if ($group_by_option == null || 'no_grouping' == $group_by_option || 'date' == $group_by_option) $sort_part .= 'date'; else $sort_part .= $group_by_option.', date';