Prohibiting editing approved records.
authorNik Okuntseff <support@anuko.com>
Wed, 6 Mar 2019 19:43:34 +0000 (19:43 +0000)
committerNik Okuntseff <support@anuko.com>
Wed, 6 Mar 2019 19:43:34 +0000 (19:43 +0000)
WEB-INF/lib/ttTimeHelper.class.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/mobile/time.tpl
WEB-INF/templates/time.tpl

index d2a3564..2a47c74 100644 (file)
@@ -738,7 +738,7 @@ class ttTimeHelper {
     $sql = "select l.id as id, TIME_FORMAT(l.start, $sql_time_format) as start,".
       " TIME_FORMAT(sec_to_time(time_to_sec(l.start) + time_to_sec(l.duration)), $sql_time_format) as finish,".
       " TIME_FORMAT(l.duration, '%k:%i') as duration, p.name as project, t.name as task, l.comment,".
-      " l.billable, l.timesheet_id, l.invoice_id $client_field from tt_log l $left_joins".
+      " l.billable, l.approved, l.timesheet_id, l.invoice_id $client_field from tt_log l $left_joins".
       " where l.date = '$date' and l.user_id = $user_id and l.group_id = $group_id and l.org_id = $org_id and l.status = 1".
       " order by l.start, l.id";
     $res = $mdb2->query($sql);
index 9da5ebd..ff57292 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.53.4829 | 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.53.4830 | 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 cde0b5e..a342c76 100644 (file)
@@ -25,7 +25,7 @@
         <td valign="top">{$record.project|escape}</td>
 {/if}
         <td align="right" valign="top">{if ($record.duration == '0:00' && $record.start <> '')}<font color="#ff0000">{/if}{$record.duration}{if ($record.duration == '0:00' && $record.start <> '')}</font>{/if}</td>
-        <td align="center">{if $record.timesheet_id|| $record.invoice_id}&nbsp;{else}<a href="time_edit.php?id={$record.id}">{$i18n.label.edit}</a>{/if}</td>
+        <td align="center">{if $record.approved || $record.timesheet_id || $record.invoice_id}&nbsp;{else}<a href="time_edit.php?id={$record.id}">{$i18n.label.edit}</a>{/if}</td>
       </tr>
       {/foreach}
     </table>
index f82897d..a181b91 100644 (file)
         <td align="right" valign="top">{if ($record.duration == '0:00' && $record.start <> '')}<font color="#ff0000">{$i18n.form.time.uncompleted}</font>{else}{$record.duration}{/if}</td>
         <td valign="top">{if $record.comment}{$record.comment|escape}{else}&nbsp;{/if}</td>
         <td valign="top" align="center">
-    {if $record.timesheet_id || $record.invoice_id}
+    {if $record.approved || $record.timesheet_id || $record.invoice_id}
           &nbsp;
     {else}
           <a href="time_edit.php?id={$record.id}">{$i18n.label.edit}</a>