X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=week.php;h=b4a9176ed357c86e7a338ef2dd5729ed7f0cb3a9;hb=05f0dada8939fad19e44c9ff26bad6ae578e34cc;hp=bf237853779e90e9f9dbdeb216f8313e9f7eab3f;hpb=1ca0df080b44b700872bec9216d8405b1f90bc11;p=timetracker.git diff --git a/week.php b/week.php index bf237853..b4a9176e 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_total = ttTimeHelper::getTimeForMonth($user->getUser(), $selected_date); - $minutes_left = round(60*$month_quota) - ttTimeHelper::toMinutes($month_total); + $month_quota_minutes = $quota->getUserQuota($selected_date->mYear, $selected_date->mMonth); + $month_total = ttTimeHelper::getTimeForMonth($selected_date); + $minutes_left = $month_quota_minutes - ttTimeHelper::toMinutes($month_total); $smarty->assign('month_total', $month_total); $smarty->assign('over_quota', $minutes_left < 0); @@ -507,6 +507,9 @@ $smarty->assign('onload', 'onLoad="fillDropdowns()"'); $smarty->assign('timestring', $startDate->toString($user->date_format).' - '.$endDate->toString($user->date_format)); $smarty->assign('time_records', $records); +//$showFiles = $user->isPluginEnabled('at'); +//$smarty->assign('show_files', $showFiles); + $smarty->assign('title', $i18n->get('title.time')); $smarty->assign('content_page_name', 'week.tpl'); $smarty->display('index.tpl');