$mdb2 = getConnection();
$client_field = null;
- if (in_array('cl', explode(',', $user->plugins)))
+ if (ttPluginEnabled('cl'))
$client_field = ", c.name as client_name";
$left_joins = "";
$left_joins = " left join tt_projects p on (ei.project_id = p.id)";
- if (in_array('cl', explode(',', $user->plugins)))
+ if (ttPluginEnabled('cl'))
$left_joins .= " left join tt_clients c on (ei.client_id = c.id)";
$sql = "select ei.id, ei.date, ei.client_id, ei.project_id, ei.name, ei.cost, ei.invoice_id $client_field, p.name as project_name
$mdb2 = getConnection();
$client_field = null;
- if (in_array('cl', explode(',', $user->plugins)))
+ if (ttPluginEnabled('cl'))
$client_field = ", c.name as client";
$left_joins = "";
$left_joins = " left join tt_projects p on (ei.project_id = p.id)";
- if (in_array('cl', explode(',', $user->plugins)))
+ if (ttPluginEnabled('cl'))
$left_joins .= " left join tt_clients c on (ei.client_id = c.id)";
$sql = "select ei.id as id $client_field, p.name as project, ei.name as item, ei.cost as cost,
}
// If we have expenses, we need to do a union with a separate query for expense items from tt_expense_items table.
- if (in_array('ex', explode(',', $user->plugins))) { // if ex(penses) plugin is enabled
+ if (ttPluginEnabled('ex')) { // if ex(penses) plugin is enabled
$sql_for_expense_items = "select ei.date as date, 2 as type, u.name as user_name, p.name as project_name,
null as task_name, ei.name as note,
null as duration, ei.cost as cost from tt_expense_items ei
foreach($invoice_items as $item)
$subtotal += $item['cost'];
if ($tax_percent) {
- $tax_expenses = in_array('et', explode(',', $user->plugins));
+ $tax_expenses = ttPluginEnabled('et');
foreach($invoice_items as $item) {
if ($item['type'] == 2 && !$tax_expenses)
continue;
$left_joins .= " left join tt_clients c on (c.id = l.client_id)";
if (($user->canManageTeam() || $user->isClient()) && $bean->getAttribute('chinvoice'))
$left_joins .= " left join tt_invoices i on (i.id = l.invoice_id and i.status = 1)";
- if ($user->canManageTeam() || $user->isClient() || in_array('ex', explode(',', $user->plugins)))
+ if ($user->canManageTeam() || $user->isClient() || ttPluginEnabled('ex'))
$left_joins .= " left join tt_users u on (u.id = l.user_id)";
if ($bean->getAttribute('chproject') || 'project' == $group_by_option)
$left_joins .= " left join tt_projects p on (p.id = l.project_id)";
// with an exception of sorting part, that is added in the end.
// However, when we have expenses, we need to do a union with a separate query for expense items from tt_expense_items table.
- if ($bean->getAttribute('chcost') && in_array('ex', explode(',', $user->plugins))) { // if ex(penses) plugin is enabled
+ if ($bean->getAttribute('chcost') && ttPluginEnabled('ex')) { // if ex(penses) plugin is enabled
$fields = array(); // An array of fields for database query.
array_push($fields, 'ei.id');
$left_joins .= " left join tt_clients c on (c.id = l.client_id)";
if (($user->canManageTeam() || $user->isClient()) && $report['show_invoice'])
$left_joins .= " left join tt_invoices i on (i.id = l.invoice_id and i.status = 1)";
- if ($user->canManageTeam() || $user->isClient() || in_array('ex', explode(',', $user->plugins)))
+ if ($user->canManageTeam() || $user->isClient() || ttPluginEnabled('ex'))
$left_joins .= " left join tt_users u on (u.id = l.user_id)";
if ($report['show_project'] || 'project' == $group_by_option)
$left_joins .= " left join tt_projects p on (p.id = l.project_id)";
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.20.3456 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.20.3457 | 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>