better menu entries for tax reports
[freeside.git] / httemplate / elements / menu.html
index e28beb7..3523f0a 100644 (file)
@@ -319,9 +319,12 @@ if($curuser->access_right('Financial reports')) {
   );
   $report_financial{'A/R Aging'} = [ $fsurl.'search/report_receivables.html', 'Accounts Receivable Aging report' ];
   $report_financial{'Prepaid Income'} = [ $fsurl.'search/report_prepaid_income.html', 'Prepaid income (unearned revenue)  report' ];
-  $report_financial{'Sales Tax Liability'} = [ $fsurl.'search/report_tax.html', 'Sales tax liability report (internal taxclass system)' ];
-  $report_financial{'Tax Liability'} = [ $fsurl.'search/report_newtax.html', 'Tax liability report (vendor data tax products system)' ]
-    if $conf->exists('enable_taxproducts');
+
+  my $taxproducts = $conf->exists('enable_taxproducts');
+  $report_financial{'Tax Liability'. ($taxproducts ? ' (internal tax data)' : '')} = [ $fsurl.'search/report_tax.html', 'Tax liability report (internal tax data)' ];
+  $report_financial{'Tax Liability (vendor tax data)'} = [ $fsurl.'search/report_newtax.html', 'Tax liability report (vendor tax data)' ]
+    if $taxproducts;
+
   $report_financial{'Customer Accounting Summary'} = [ $fsurl.'search/report_customer_accounting_summary.html', 'Customer accounting summary report' ];
 
 } elsif($curuser->access_right('Receivables report')) {
@@ -583,7 +586,7 @@ $config_menu{'Broadband'} = [ \%config_broadband, ''    ]
 $config_menu{'Phone'}  = [ \%config_phone, ''    ]
   if $curuser->access_right('Configuration');
 $config_menu{'Network Monitoring'} = [ \%config_nms, '' ]
-  if $curuser->access_right('Configuration')
+  if $curuser->access_right('Configure network monitoring')
   && $conf->config('network_monitoring_system') eq 'Torrus_Internal';
 $config_menu{'Miscellaneous'} = [ \%config_misc, ''    ]
   if $curuser->access_right('Configuration' )
@@ -638,7 +641,8 @@ if ( $conf->config('ticket_system') ) {
     ],
 }
 
-if ( $conf->config('network_monitoring_system') eq 'Torrus_Internal' ) {
+if ( $conf->config('network_monitoring_system') eq 'Torrus_Internal' &&
+  $curuser->access_right('Configure network monitoring') ) {
   $menu{'Network Main'} =
     [ $fsurl.'torrus/main', 'Network monitoring start page' ],
 }