Was reporting less that 1 hour over quota incorrectly.
// fromMinutes - converts a number of minutes to format 00:00
static function fromMinutes($minutes){
- $hours = (string)((int)($minutes / 60));
+ $hours = (string)((int)abs($minutes / 60));
$mins = (string)(abs($minutes % 60));
if (strlen($hours) == 1)
$hours = '0'.$hours;
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.26.3507 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.27.3508 | 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>
{if $month_total}
<tr>
<td align="left">{$i18n.label.month_total}: {$month_total}</td>
- {if $month_left|strpos:'-' === 0}
- <td align="right">{$i18n.label.month_over}: <span style="color: green;">{$month_left|substr:1}</span></td>
+ {if $over_quota}
+ <td align="right">{$i18n.label.month_over}: <span style="color: green;">{$month_left}</span></td>
{else}
<td align="right">{$i18n.label.month_left}: <span style="color: red;">{$month_left}</span></td>
{/if}
$minutesLeft = ttTimeHelper::toMinutes($monthlyQuota) - ttTimeHelper::toMinutes($month_total);
$smarty->assign('month_total', $month_total);
+ $smarty->assign('over_quota', $minutesLeft < 0);
$smarty->assign('month_left', ttTimeHelper::fromMinutes($minutesLeft));
}