if ($user->isPluginEnabled('ts')) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.submit_status = 1 and ts.approve_status is null)";
else if ($timesheet_option == TIMESHEET_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 1)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approve_status = 1)";
else if ($timesheet_option == TIMESHEET_NOT_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 0)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approve_status = 0)";
else if ($options['show_timesheet'])
$inner_joins .= " left join tt_timesheets ts on (l.timesheet_id = ts.id)"; // Left join for timesheet nme.
}
if ($user->isPluginEnabled('ts')) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.submit_status = 1 and ts.approve_status is null)";
else if ($timesheet_option == TIMESHEET_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 1)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approve_status = 1)";
else if ($timesheet_option == TIMESHEET_NOT_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 0)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approve_status = 0)";
else if ($options['show_timesheet'])
$inner_joins .= " left join tt_timesheets ts on (ei.timesheet_id = ts.id)"; // Left join for timesheet name.
}
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.submit_status = 1 and ts.approve_status is null)";
else if ($timesheet_option == TIMESHEET_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 1)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approve_status = 1)";
else if ($timesheet_option == TIMESHEET_NOT_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 0)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approve_status = 0)";
}
// Prepare a query for time items.
$sql = "select $time_part $units_part $cost_part from tt_log l $left_joins $inner_joins $where";
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.submit_status = 1 and ts.approve_status is null)";
else if ($timesheet_option == TIMESHEET_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 1)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approve_status = 1)";
else if ($timesheet_option == TIMESHEET_NOT_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 0)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approve_status = 0)";
}
$where = ttReportHelper::getExpenseWhere($options);
$sql_for_expenses = "select null as time";
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.submit_status = 1 and ts.approve_status is null)";
else if ($timesheet_option == TIMESHEET_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 1)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approve_status = 1)";
else if ($timesheet_option == TIMESHEET_NOT_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 0)";
+ $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approve_status = 0)";
}
$join .= $inner_joins;
return $join;
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.submit_status = 1 and ts.approve_status is null)";
else if ($timesheet_option == TIMESHEET_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 1)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approve_status = 1)";
else if ($timesheet_option == TIMESHEET_NOT_APPROVED)
- $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 0)";
+ $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approve_status = 0)";
}
$join .= $inner_joins;
return $join;
<td>{$timesheet.client_name|escape}</td>
{/if}
<td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
- {if $timesheet.approval_status == null}
+ {if $timesheet.approve_status == null}
<td></td>
{else}
- <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
+ <td>{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
{/if}
<td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
<td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>
<td>{$timesheet.client_name|escape}</td>
{/if}
<td>{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
- {if $timesheet.approval_status == null}
+ {if $timesheet.approve_status == null}
<td></td>
{else}
- <td>{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
+ <td>{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
{/if}
<td><a href="timesheet_view.php?id={$timesheet.id}">{$i18n.label.view}</a></td>
<td><a href="timesheet_edit.php?id={$timesheet.id}">{$i18n.label.edit}</a></td>