]> wagnertech.de Git - timetracker.git/blobdiff - invoices.php
A bit more work in progress on remote work plugin.
[timetracker.git] / invoices.php
index 0617a44f2020043dedee8797af0f704f4521057d..de51b5366461cbbb7ff9eba7f58a0ad83b29c71e 100644 (file)
 
 require_once('initialize.php');
 import('form.Form');
-import('ttTeamHelper');
+import('ttGroupHelper');
 
-// Access check.
-if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_own_invoices')) || !$user->isPluginEnabled('iv')) {
+// Access checks.
+if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_client_invoices'))) {
   header('Location: access_denied.php');
   exit();
 }
+if (!$user->isPluginEnabled('iv')) {
+  header('Location: feature_disabled.php');
+  exit();
+}
+// End of access checks.
 
-$invoices = ttTeamHelper::getActiveInvoices();
+$invoices = ttGroupHelper::getActiveInvoices();
 
 $smarty->assign('invoices', $invoices);
-$smarty->assign('title', $i18n->getKey('title.invoices'));
+$smarty->assign('title', $i18n->get('title.invoices'));
 $smarty->assign('content_page_name', 'invoices.tpl');
 $smarty->display('index.tpl');