From 58057bc7a8634917640cc660971bfc3c8440a687 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 17 Dec 2018 14:03:24 +0000 Subject: [PATCH] Fixed quota output for week view. --- WEB-INF/templates/footer.tpl | 2 +- week.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index de22892f..55c2266b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.31.4658 | Copyright © Anuko | +  Anuko Time Tracker 1.18.32.4659 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index c1c76f9d..1dd6e56a 100644 --- 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); -- 2.20.1