Some more work in progress on timesheets.
authorNik Okuntseff <support@anuko.com>
Thu, 21 Feb 2019 23:16:53 +0000 (23:16 +0000)
committerNik Okuntseff <support@anuko.com>
Thu, 21 Feb 2019 23:16:53 +0000 (23:16 +0000)
WEB-INF/lib/ttTimesheetHelper.class.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/timesheet_view.tpl
timesheet_view.php

index 94b9bef..07f02f8 100644 (file)
@@ -215,7 +215,7 @@ class ttTimesheetHelper {
     if ($user->isClient()) $client_part = "and ts.client_id = $user->client_id";
 
     $sql = "select ts.id, ts.user_id, u.name as user_name, ts.client_id, c.name as client_name,".
-      " ts.name, ts.submitter_comment from tt_timesheets ts".
+      " ts.name, ts.submitter_comment, ts.submit_status from tt_timesheets ts".
       " left join tt_users u on (u.id = ts.user_id)".
       " left join tt_clients c on (c.id = ts.client_id)".
       " where ts.id = $timesheet_id and ts.group_id = $group_id and ts.org_id = $org_id $client_part and ts.status is not null";
index 37f3de1..86ccb33 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.37.4750 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.37.4751 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index dbdd42d..c22df7a 100644 (file)
 {if $timesheet['client_id']}
         <tr><td align="left"><b>{$i18n.label.client}:</b> {$timesheet['client_name']|escape}</td></tr>
 {/if}
-{if $timesheet['submitter_comment']}
+{if $not_client}
+        <tr><td align="left"><b>{$i18n.label.submitted}:</b> {if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td></tr>
+  {if $timesheet['submitter_comment']}
         <tr><td align="left"><b>{$i18n.label.comment}:</b> {$timesheet['submitter_comment']|escape}</td></tr>
+  {/if}
 {/if}
       </table>
     </td>
index bbac161..80b3b77 100644 (file)
@@ -50,7 +50,9 @@ if (!$timesheet) {
 $options = ttTimesheetHelper::getReportOptions($timesheet);
 $subtotals = ttReportHelper::getSubtotals($options);
 $totals = ttReportHelper::getTotals($options);
+$notClient = !$user->isClient();
 
+$smarty->assign('not_client', $notClient);
 $smarty->assign('group_by_header', ttReportHelper::makeGroupByHeader($options));
 $smarty->assign('timesheet', $timesheet);
 $smarty->assign('subtotals', $subtotals);