From: Nik Okuntseff Date: Mon, 19 Mar 2018 15:01:57 +0000 (+0000) Subject: Work in progress on fav reports to include IP info. X-Git-Tag: timetracker_1.19-1~996 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=aad7651dc744e59b94b14c7e2d5626bbcc713569;p=timetracker.git Work in progress on fav reports to include IP info. --- diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index bd882559..af8549de 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -368,7 +368,7 @@ class ttReportHelper { // Add paid status. if ($canViewReports && $bean->getAttribute('chpaid')) array_push($fields, 'ei.paid as paid'); - // Add IP address. NULL for now for expenses. + // Add IP address. if ($canViewReports && $bean->getAttribute('chip')) { array_push($fields, 'ei.created as created'); array_push($fields, 'ei.created_ip as created_ip'); @@ -553,6 +553,16 @@ class ttReportHelper { array_push($fields, "cast(l.billable * coalesce(upb.rate, 0) * time_to_sec(l.duration)/3600 as decimal(10,2)) as cost"); // Use project rate for user. array_push($fields, "null as expense"); } + // Add paid status. + if ($canViewReports && $report['show_paid']) + array_push($fields, 'l.paid as paid'); + // Add IP address. + if ($canViewReports && $report['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'); + } // Add invoice name if it is selected. if (($canViewReports || $isClient) && $report['show_invoice']) array_push($fields, 'i.name as invoice'); @@ -619,6 +629,16 @@ class ttReportHelper { array_push($fields, 'ei.name as note'); array_push($fields, 'ei.cost as cost'); array_push($fields, 'ei.cost as expense'); + // Add paid status. + if ($canViewReports && $report['show_paid']) + array_push($fields, 'ei.paid as paid'); + // Add IP address. + if ($canViewReports && $report['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'); + } // Add invoice name if it is selected. if (($canViewReports || $isClient) && $report['show_invoice']) array_push($fields, 'i.name as invoice'); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ddaab6bd..574e53e3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.61.4115 | Copyright © Anuko | +  Anuko Time Tracker 1.17.61.4116 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}