X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=time.php;h=3543cce023e70ed7f83be6787dfff433e227b13d;hb=33e6efffe820369eacd46596a8f799f941d42f93;hp=4042d7c5dfa83d612b12c69429abc006587753a7;hpb=ba0b5f34efabfeded3112115086eaa9d00f2a345;p=timetracker.git diff --git a/time.php b/time.php index 4042d7c5..3543cce0 100644 --- a/time.php +++ b/time.php @@ -66,12 +66,13 @@ if ($user->isPluginEnabled('cf')) { if ($user->isPluginEnabled('mq')){ require_once('plugins/MonthlyQuota.class.php'); $quota = new MonthlyQuota(); - $monthlyQuota = $quota->get($selected_date->mYear, $selected_date->mMonth); + $month_quota = $quota->get($selected_date->mYear, $selected_date->mMonth); $month_total = ttTimeHelper::getTimeForMonth($user->getActiveUser(), $selected_date); - $minutesLeft = ttTimeHelper::toMinutes($monthlyQuota) - ttTimeHelper::toMinutes($month_total); + $minutes_left = ttTimeHelper::toMinutes($month_quota) - ttTimeHelper::toMinutes($month_total); $smarty->assign('month_total', $month_total); - $smarty->assign('month_left', ttTimeHelper::fromMinutes($minutesLeft)); + $smarty->assign('over_quota', $minutes_left < 0); + $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left)); } // Initialize variables.