$group_id = $user->getGroup();
$org_id = $user->org_id;
- $sql = "select sum(cost) as sm from tt_expense_items".
+ $sql = "select sum(cost) as total from tt_expense_items".
" where user_id = $user_id and group_id = $group_id and org_id = $org_id".
" and date = ".$mdb2->quote($date)." and status = 1";
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
$val = $res->fetchRow();
- $val['sm'] = str_replace('.', $user->getDecimalMark(), $val['sm']);
- return $val['sm'];
+ $val['total'] = str_replace('.', $user->getDecimalMark(), $val['total']);
+ return $val['total'];
}
return false;
}
$this->allow_ip = $val['allow_ip'];
$this->password_complexity = $val['password_complexity'];
$this->group_name = $val['group_name'];
- $this->currency = $val['currency'];
*/
+ $this->currency = $val['currency'];
$this->plugins = $val['plugins'];
/*
$this->lock_spec = $val['lock_spec'];
return ($this->behalfGroup ? $this->behalfGroup->decimal_mark : $this->decimal_mark);
}
+ // getDateFormat returns date format for active group.
+ function getDateFormat() {
+ return ($this->behalfGroup ? $this->behalfGroup->date_format : $this->date_format);
+ }
+
+ // getTimeFormat returns time format for active group.
+ function getTimeFormat() {
+ return ($this->behalfGroup ? $this->behalfGroup->time_format : $this->time_format);
+ }
+
// getTrackingMode returns tracking mode for active group.
function getTrackingMode() {
return ($this->behalfGroup ? $this->behalfGroup->tracking_mode : $this->tracking_mode);
return ($this->behalfGroup ? $this->behalfGroup->record_type : $this->record_type);
}
+ // getCurrency returns currency string for active group.
+ function getCurrency() {
+ return ($this->behalfGroup ? $this->behalfGroup->currency : $this->currency);
+ }
+
// getPlugins returns plugins string for active group.
function getPlugins() {
return ($this->behalfGroup ? $this->behalfGroup->plugins : $this->plugins);
var comment_control = document.getElementById("item_name");
var cost_control = document.getElementById("cost");
- var replaceDecimalMark = ("." != "{$user->decimal_mark}");
+ var replaceDecimalMark = ("." != "{$user->getDecimalMark()}");
// Calculate cost.
var dropdown = document.getElementById("predefined_expense");
else {
var expenseCost = defined_expenses[dropdown.selectedIndex - 1][2];
if (replaceDecimalMark)
- expenseCost = expenseCost.replace("{$user->decimal_mark}", ".");
+ expenseCost = expenseCost.replace("{$user->getDecimalMark()}", ".");
var newCost = (quantity_control.value * expenseCost).toFixed(2);
if (replaceDecimalMark)
- newCost = newCost.replace(".", "{$user->decimal_mark}");
+ newCost = newCost.replace(".", "{$user->getDecimalMark()}");
cost_control.value = newCost;
}
}
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
- <td nowrap align="right">{$i18n.label.day_total}: {$user->currency|escape} {$day_total}</td>
+ <td nowrap align="right">{$i18n.label.day_total}: {$user->getCurrency()|escape} {$day_total}</td>
</tr>
</table>
{/if}
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4583 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4584 | 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>