From 343bde69ae7c9d8efc8a814ce891a3f04b8f502c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 21 Jan 2018 18:43:44 +0000 Subject: [PATCH] Integrated paid status in emailed reports. --- WEB-INF/lib/ttReportHelper.class.php | 10 ++++++++++ WEB-INF/lib/ttTeamHelper.class.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index ba8c9c92..41ddd0fe 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -1166,6 +1166,8 @@ class ttReportHelper { $body .= ''.$i18n->getKey('label.note').''; if ($bean->getAttribute('chcost')) $body .= ''.$i18n->getKey('label.cost').''; + if ($bean->getAttribute('chpaid')) + $body .= ''.$i18n->getKey('label.paid').''; if ($bean->getAttribute('chinvoice')) $body .= ''.$i18n->getKey('label.invoice').''; $body .= ''; @@ -1207,6 +1209,7 @@ class ttReportHelper { $body .= ($user->canManageTeam() || $user->isClient()) ? $subtotals[$prev_grouped_by]['cost'] : $subtotals[$prev_grouped_by]['expenses']; $body .= ''; } + if ($bean->getAttribute('chpaid')) $body .= ''; if ($bean->getAttribute('chinvoice')) $body .= ''; $body .= ''; $body .= ' '; @@ -1239,6 +1242,11 @@ class ttReportHelper { $body .= ''.htmlspecialchars($record['note']).''; if ($bean->getAttribute('chcost')) $body .= ''.$record['cost'].''; + if ($bean->getAttribute('chpaid')) { + $body .= ''; + $body .= $record['paid'] == 1 ? $i18n->getKey('label.yes') : $i18n->getKey('label.no'); + $body .= ''; + } if ($bean->getAttribute('chinvoice')) $body .= ''.htmlspecialchars($record['invoice']).''; $body .= ''; @@ -1268,6 +1276,7 @@ class ttReportHelper { $body .= ($user->canManageTeam() || $user->isClient()) ? $subtotals[$cur_grouped_by]['cost'] : $subtotals[$cur_grouped_by]['expenses']; $body .= ''; } + if ($bean->getAttribute('chpaid')) $body .= ''; if ($bean->getAttribute('chinvoice')) $body .= ''; $body .= ''; } @@ -1290,6 +1299,7 @@ class ttReportHelper { $body .= ($user->canManageTeam() || $user->isClient()) ? $totals['cost'] : $totals['expenses']; $body .= ''; } + if ($bean->getAttribute('chpaid')) $body .= ''; if ($bean->getAttribute('chinvoice')) $body .= ''; $body .= ''; diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 61271237..553ab0d9 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -811,7 +811,7 @@ class ttTeamHelper { if (isset($fields['tracking_mode'])) $tracking_mode_part = ', tracking_mode = '.intval($fields['tracking_mode']); if (isset($fields['record_type'])) $record_type_part = ', record_type = '.intval($fields['record_type']); if (isset($fields['uncompleted_indicators'])) $uncompleted_indicators_part = ', uncompleted_indicators = '.intval($fields['uncompleted_indicators']); - if (!empty($fields['bcc_email'])) $bcc_email_part = ', bcc_email = '.$mdb2->quote($fields['bcc_email']); + if (isset($fields['bcc_email'])) $bcc_email_part = ', bcc_email = '.$mdb2->quote($fields['bcc_email']); if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); if (isset($fields['workday_hours'])) $workday_hours_part = ', workday_hours = '.$mdb2->quote($fields['workday_hours']); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index a9a742b7..9a141507 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.15.2.3770 | Copyright © Anuko | +  Anuko Time Tracker 1.15.3.3771 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1