if ($user->isClient()) $client_part = " and client_id = $user->client_id";
- $sql = "select * from tt_invoices where id = $invoice_id and group_id = $user->group_id $client_part and status = 1";
+ $sql = "select * from tt_invoices where id = $invoice_id and group_id = ".
+ $user->getActiveGroup()."$client_part and status = 1";
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
if ($val = $res->fetchRow())
$mdb2 = getConnection();
global $user;
- $sql = "select id from tt_invoices where group_id = $user->group_id and name = ".$mdb2->quote($invoice_name)." and status = 1";
+ $sql = "select id from tt_invoices where group_id = ".
+ $user->getActiveGroup()." and name = ".$mdb2->quote($invoice_name)." and status = 1";
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
$val = $res->fetchRow();
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error')) return false;
- $sql = "update tt_invoices set status = NULL where id = $invoice_id and group_id = $user->group_id";
+ $sql = "update tt_invoices set status = NULL where id = $invoice_id and group_id = ".$user->getActiveGroup();
$affected = $mdb2->exec($sql);
return (!is_a($affected, 'PEAR_Error'));
}
if (isset($fields['project_id'])) $project_id = (int) $fields['project_id'];
// Create a new invoice record.
- $sql = "insert into tt_invoices (group_id, name, date, client_id)
- values($user->group_id, ".$mdb2->quote($name).", ".$mdb2->quote($date).", $client_id)";
+ $sql = "insert into tt_invoices (group_id, name, date, client_id) values(".
+ $user->getActiveGroup().", ".$mdb2->quote($name).", ".$mdb2->quote($date).", $client_id)";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error')) return false;
$sql = "select c.id, c.cron_spec, c.report_id, c.email, c.cc, c.subject, c.report_condition, c.status, fr.name from tt_cron c
left join tt_fav_reports fr on (fr.id = c.report_id)
- where c.id = $id and c.group_id = $user->group_id";
+ where c.id = $id and c.group_id = ".$user->getActiveGroup();
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
$val = $res->fetchRow();
$mdb2 = getConnection();
- $sql = "delete from tt_cron where id = $id and group_id = $user->group_id";
+ $sql = "delete from tt_cron where id = $id and group_id = ".$user->getActiveGroup();
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
$mdb2 = getConnection();
$sql = "select id, name, cost from tt_predefined_expenses
- where id = $id and group_id = $user->group_id";
+ where id = $id and group_id = ".$user->getActiveGroup();
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
$val = $res->fetchRow();
$mdb2 = getConnection();
- $sql = "delete from tt_predefined_expenses where id = $id and group_id = $user->group_id";
+ $sql = "delete from tt_predefined_expenses where id = $id and group_id = ".$user->getActiveGroup();
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.08.4376 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.08.4377 | 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>