From: Nik Okuntseff Date: Sun, 17 Feb 2019 13:05:55 +0000 (+0000) Subject: Refactoring ttReportHelper for timesheets. X-Git-Tag: timetracker_1.19-1~323 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=90437750e88c95b0412c3f171617d96d4ce87bb8;p=timetracker.git Refactoring ttReportHelper for timesheets. --- diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 686283bc..1b5fc6f1 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -150,9 +150,10 @@ class ttReportHelper { // Prepare a query for time items in tt_log table. $fields = array(); // An array of fields for database query. - array_push($fields, 'l.id as id'); + array_push($fields, 'l.id'); + array_push($fields, 'l.user_id'); array_push($fields, '1 as type'); // Type 1 is for tt_log entries. - array_push($fields, 'l.date as date'); + array_push($fields, 'l.date'); if($canViewReports || $isClient) array_push($fields, 'u.name as user'); // Add client name if it is selected. @@ -210,13 +211,13 @@ class ttReportHelper { } // Add paid status. if ($canViewReports && $options['show_paid']) - array_push($fields, 'l.paid as paid'); + array_push($fields, 'l.paid'); // Add IP address. if ($canViewReports && $options['show_ip']) { - array_push($fields, 'l.created as created'); - array_push($fields, 'l.created_ip as created_ip'); - array_push($fields, 'l.modified as modified'); - array_push($fields, 'l.modified_ip as modified_ip'); + array_push($fields, 'l.created'); + array_push($fields, 'l.created_ip'); + array_push($fields, 'l.modified'); + array_push($fields, 'l.modified_ip'); } // Add invoice name if it is selected. if (($canViewReports || $isClient) && $options['show_invoice']) @@ -257,6 +258,7 @@ class ttReportHelper { $fields = array(); // An array of fields for database query. array_push($fields, 'ei.id'); + array_push($fields, 'ei.user_id'); array_push($fields, '2 as type'); // Type 2 is for tt_expense_items entries. array_push($fields, 'ei.date'); if($canViewReports || $isClient) @@ -288,13 +290,13 @@ class ttReportHelper { array_push($fields, 'ei.cost as expense'); // Add paid status. if ($canViewReports && $options['show_paid']) - array_push($fields, 'ei.paid as paid'); + array_push($fields, 'ei.paid'); // Add IP address. if ($canViewReports && $options['show_ip']) { - array_push($fields, 'ei.created as created'); - array_push($fields, 'ei.created_ip as created_ip'); - array_push($fields, 'ei.modified as modified'); - array_push($fields, 'ei.modified_ip as modified_ip'); + array_push($fields, 'ei.created'); + array_push($fields, 'ei.created_ip'); + array_push($fields, 'ei.modified'); + array_push($fields, 'ei.modified_ip'); } // Add invoice name if it is selected. if (($canViewReports || $isClient) && $options['show_invoice']) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b252d6f8..8ef58558 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.37.4730 | Copyright © Anuko | +  Anuko Time Tracker 1.18.37.4731 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}