$org_id = $user->org_id;
if ($time_log_ids) {
- $sql = "update tt_log l".
- // TODO: inner join does not work properly for de-assignment. Improve.
- // " inner join tt_timesheets ts on (ts.id = $timesheet_id and ts.approve_status is null)".
+ if ($timesheet_id)
+ $inner_join = " inner join tt_timesheets ts on (ts.id = $timesheet_id and ts.approve_status is null)";
+
+ $sql = "update tt_log l $inner_join".
" set l.timesheet_id = ".$mdb2->quote($timesheet_id).
" where l.id in(".join(', ', $time_log_ids).") and l.user_id = $user_id and l.group_id = $group_id and l.org_id = $org_id";
$affected = $mdb2->exec($sql);
// Parts for client and project.
if ($options['client_id']) $client_part = ' and client_id = '.(int)$options['client_id'];
if ($options['project_id']) $project_part = ' and project_id = '.(int)$options['project_id'];
+ // TODO: test and fix the above for NULL client and project ids...
// Determine start and end dates.
$dateFormat = $user->getDateFormat();
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.52.4818 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.52.4819 | Copyright © <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>