return false;
}
- // submitTimesheet marks a timesheet as submitted and also sends an email
- // to a selected approver.
- static function submitTimesheet($fields) {
+ // markSubmitted marks a timesheet as submitted.
+ static function markSubmitted($fields) {
global $user;
$mdb2 = getConnection();
$group_id = $user->getGroup();
$org_id = $user->org_id;
- // First, mark timesheet as submitted.
- // Even if mail part below does not work, this will get us a functioning workflow
- // without email notification.
$timesheet_id = $fields['timesheet_id'];
$sql = "update tt_timesheets set submit_status = 1".
" where id = $timesheet_id and user_id = $user_id and group_id = $group_id and org_id = $org_id";
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.52.4823 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.52.4824 | 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>
if ($request->getParameter('btn_submit')) {
$fields = array('timesheet_id' => $timesheet['id'],
'approver_id' => $approver_id); // TODO: obtain (and check) approver id above during access checks.
- if (!ttTimesheetHelper::submitTimesheet($fields))
+ if (!ttTimesheetHelper::markSubmitted($fields))
$err->add($i18n->get('error.db'));
if ($err->no() && !ttTimesheetHelper::sendSubmitEmail($fields)) {
$err->add($i18n->get('error.mail_send'));