Просмотр исходного кода

Add Invoices icon to account menu

Alan Lam 7 лет назад
Родитель
Сommit
e867b3ab1f
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      controllers/account.php

+ 8 - 0
controllers/account.php

@@ -27,6 +27,14 @@ if($user->level >= User::LEVEL_ADMIN) {
 	$icons[] = new AccountIcon(_("Projects"), "/account/projects", "list");
 	$icons[] = new AccountIcon(_("Locations"), "/account/locations", "map-marker");
 	$icons[] = new AccountIcon(_("Templates"), "/account/templates", "file-alt");
+
+	$pending_tester_invoice_test_count = count(Test::query(["status_tester_invoice" => Test::STATUS_TESTER_INVOICE_PENDING]));
+
+	$invoice_icon = new AccountIcon(_("Invoices"), "/account/tests?status_tester_invoice=100", "file-invoice");
+	$invoice_icon->setCounter($pending_tester_invoice_test_count);
+
+	$icons[] = $invoice_icon;
+
 }
 
 if($user->level >= User::LEVEL_CUSTOMER) {