From a1f560292f6ce8999022da19b9d487636bf93769 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Mar 2019 18:32:26 +0000 Subject: [PATCH] Fixed emailed reports to have note on separate row. --- WEB-INF/lib/ttReportHelper.class.php | 14 ++++++-------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 4de5a483..545fcc46 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -849,8 +849,6 @@ class ttReportHelper { $body .= ''.$i18n->get('label.duration').''; if ($options['show_work_units']) $body .= ''.$i18n->get('label.work_units_short').''; - if ($options['show_note']) - $body .= ''.$i18n->get('label.note').''; if ($options['show_cost']) $body .= ''.$i18n->get('label.cost').''; if ($options['show_approved']) @@ -897,7 +895,6 @@ class ttReportHelper { if ($options['show_end']) $body .= ''; if ($options['show_duration']) $body .= ''.$subtotals[$prev_grouped_by]['time'].''; if ($options['show_work_units']) $body .= ''.$subtotals[$prev_grouped_by]['units'].''; - if ($options['show_note']) $body .= ''; if ($options['show_cost']) { $body .= ''; $body .= ($canViewReports || $isClient) ? $subtotals[$prev_grouped_by]['cost'] : $subtotals[$prev_grouped_by]['expenses']; @@ -937,8 +934,6 @@ class ttReportHelper { $body .= ''.$record['duration'].''; if ($options['show_work_units']) $body .= ''.$record['units'].''; - if ($options['show_note']) - $body .= ''.htmlspecialchars($record['note']).''; if ($options['show_cost']) $body .= ''.$record['cost'].''; if ($options['show_approved']) { @@ -961,7 +956,12 @@ class ttReportHelper { if ($options['show_timesheet']) $body .= ''.htmlspecialchars($record['timesheet']).''; $body .= ''; - + if ($options['show_note']) { + $body .= ''; + $body .= ''.$i18n->get('label.note').':'; + $body .= ''.$record['note'].''; + $body .= ''; + } $prev_date = $record['date']; if ($print_subtotals) $prev_grouped_by = $record['grouped_by']; @@ -982,7 +982,6 @@ class ttReportHelper { if ($options['show_end']) $body .= ''; if ($options['show_duration']) $body .= ''.$subtotals[$cur_grouped_by]['time'].''; if ($options['show_work_units']) $body .= ''.$subtotals[$cur_grouped_by]['units'].''; - if ($options['show_note']) $body .= ''; if ($options['show_cost']) { $body .= ''; $body .= ($canViewReports || $isClient) ? $subtotals[$cur_grouped_by]['cost'] : $subtotals[$cur_grouped_by]['expenses']; @@ -1009,7 +1008,6 @@ class ttReportHelper { if ($options['show_end']) $body .= ''; if ($options['show_duration']) $body .= ''.$totals['time'].''; if ($options['show_work_units']) $body .= ''.$totals['units'].''; - if ($options['show_note']) $body .= ''; if ($options['show_cost']) { $body .= ''.htmlspecialchars($user->currency).' '; $body .= ($canViewReports || $isClient) ? $totals['cost'] : $totals['expenses']; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2fb33067..6fe11c1f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.57.4858 | Copyright © Anuko | +  Anuko Time Tracker 1.18.57.4859 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1