X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoice_view.php;h=e94c04b72bba78ef28cd5d01fa1e42133ed320a8;hb=ac5189157ef60820dd125400baee9f408a9ba2ea;hp=a40d9b670b14848ca9912cdc9451a8c6c5ee6d00;hpb=70272dc970919c348288bd09ff835f05e7538949;p=timetracker.git diff --git a/invoice_view.php b/invoice_view.php index a40d9b67..e94c04b7 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -32,7 +32,7 @@ import('ttInvoiceHelper'); import('ttClientHelper'); // Access check. -if (!ttAccessCheck(right_view_invoices)) { +if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) { header('Location: access_denied.php'); exit(); } @@ -52,7 +52,7 @@ $tax = 0; foreach($invoice_items as $item) $subtotal += $item['cost']; if ($tax_percent) { - $tax_expenses = in_array('et', explode(',', $user->plugins)); + $tax_expenses = $user->isPluginEnabled('et'); foreach($invoice_items as $item) { if ($item['type'] == 2 && !$tax_expenses) continue;