if ($options['show_work_units']) {
if ($user->getConfigOption('unit_totals_only'))
array_push($fields, "null as units");
- else
- array_push($fields, "if(l.billable = 0 or time_to_sec(l.duration)/60 < $user->first_unit_threshold, 0, ceil(time_to_sec(l.duration)/60/$user->minutes_in_unit)) as units");
+ else {
+ $firstUnitThreshold = $user->getConfigInt('1st_unit_threshold');
+ $minutesInUnit = $user->getConfigInt('minutes_in_unit');
+ array_push($fields, "if(l.billable = 0 or time_to_sec(l.duration)/60 < $firstUnitThreshold, 0, ceil(time_to_sec(l.duration)/60/$minutesInUnit)) as units");
+ }
}
// Add note.
if ($options['show_note'])
return $config->getDefinedValue($name);
}
+ // getConfigInt retruns an integer value defined in a group, or false.
+ function getConfigInt($name) {
+ $config = new ttConfigHelper($this->getConfig());
+ return $config->getIntValue($name);
+ }
+
// can - determines whether user has a right to do something.
function can($do_something) {
return in_array($do_something, $this->rights);
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.31.4651 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.31.4652 | 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>