Fixed quota output for week view.
authorNik Okuntseff <support@anuko.com>
Mon, 17 Dec 2018 14:03:24 +0000 (14:03 +0000)
committerNik Okuntseff <support@anuko.com>
Mon, 17 Dec 2018 14:03:24 +0000 (14:03 +0000)
WEB-INF/templates/footer.tpl
week.php

index de22892..55c2266 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.31.4658 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.32.4659 | Copyright &copy; <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>
index c1c76f9..1dd6e56 100644 (file)
--- a/week.php
+++ b/week.php
@@ -91,9 +91,9 @@ if ($user->isPluginEnabled('cf')) {
 if ($user->isPluginEnabled('mq')){
   require_once('plugins/MonthlyQuota.class.php');
   $quota = new MonthlyQuota();
-  $month_quota = $quota->get($selected_date->mYear, $selected_date->mMonth);
+  $month_quota_minutes = $quota->get($selected_date->mYear, $selected_date->mMonth);
   $month_total = ttTimeHelper::getTimeForMonth($selected_date);
-  $minutes_left = round(60*$month_quota) - ttTimeHelper::toMinutes($month_total);
+  $minutes_left = $month_quota_minutes - ttTimeHelper::toMinutes($month_total);
 
   $smarty->assign('month_total', $month_total);
   $smarty->assign('over_quota', $minutes_left < 0);