continue sales person work: customer and package selection, commissions, reporting...
[freeside.git] / httemplate / elements / menu.html
index 14d36c3..9d33804 100644 (file)
@@ -294,9 +294,11 @@ tie my %report_ticketing, 'Tie::IxHash',
   'Advanced ticket reports' => [ $fsurl.'rt/Search/Build.html?NewQuery=1', 'List tickets by any criteria' ],
 ;
 
-tie my %report_employees, 'Tie::IxHash',
-  'Employee Commission Report' => [ $fsurl.'search/report_employee_commission.html', '' ],
-  'Employee Audit Report' => [ $fsurl.'search/report_employee_audit.html', 'Employee audit report' ],
+tie my %report_employees, 'Tie::IxHash';
+$report_employees{'Employee Commission Report'} = [ $fsurl.'search/report_employee_commission.html', '' ]
+  if $curuser->access_right('Employees: Commission Report');
+$report_employees{'Employee Audit Report'} = [ $fsurl.'search/report_employee_audit.html', 'Employee audit report' ]
+  if $curuser->access_right('Employees: Audit Report');
 ;
 
 tie my %report_bill_event, 'Tie::IxHash',
@@ -356,6 +358,9 @@ if( $curuser->access_right('Financial reports') ) {
   $report_financial{'Tax Liability (vendor tax data)'} = [ $fsurl.'search/report_newtax.html', 'Tax liability report (vendor tax data)' ]
     if $taxproducts;
 
+  # most sites don't need this but there isn't really a config to enable it
+  $report_financial{'E911 Fee Summary'} = [ $fsurl.'search/report_e911.html', 'E911 fee summary' ];
+
   $report_financial{'Customer Accounting Summary'} = [ $fsurl.'search/report_customer_accounting_summary.html', 'Customer accounting summary report' ];
 
 } elsif($curuser->access_right('Receivables report')) {
@@ -397,7 +402,7 @@ $report_menu{'Tickets'}        = [ \%report_ticketing, 'Ticket reports' ]
   if $conf->config('ticket_system')
   ;#&& FS::TicketSystem->access_right(\%session, 'Something');
 $report_menu{'Employees'}      =  [ \%report_employees, 'Employee reports'  ]
-  if $curuser->access_right('Financial reports');
+  if keys %report_employees;
 $report_menu{'Billing events'} =  [ \%report_bill_event, 'Billing events' ]
   if $curuser->access_right('Billing event reports');
 $report_menu{'Financial'}      = [ \%report_financial, 'Financial reports' ]
@@ -495,6 +500,7 @@ tie my %config_broadband, 'Tie::IxHash',
 tie my %config_phone, 'Tie::IxHash',
   'View/Edit phone device types' => [ $fsurl.'browse/part_device.html', 'Phone device types' ],
   'View/Edit bulk DID vendors' => [ $fsurl.'browse/did_vendor.html', 'Bulk DID vendors' ],
+  'View/Edit Carriers' => [ $fsurl.'browse/cdr_carrier.html', 'Carriers' ],
 ;
 
 tie my %config_radius, 'Tie::IxHash',
@@ -560,7 +566,7 @@ tie my %config_agent, 'Tie::IxHash',
 ;
 
 tie my %config_sales, 'Tie::IxHash',
-  'Sales'      => [ $fsurl.'browse/sales.cgi', 'Sales bring in new business.' ],
+  'Sales People' => [ $fsurl.'browse/sales.html', 'Sales people bring in new business.' ],
 ;
 
 tie my %config_billing_rates, 'Tie::IxHash',
@@ -667,14 +673,20 @@ if ( $curuser->access_right('Configuration' ) ) {
   %config_menu = (
     'Settings'      => [ $fsurl.'config/config-view.cgi', '' ],
     'separator'     => '', #its a separator!
-    'Employees'     => [ \%config_employees, '' ],
-    'Resellers'     => [ \%config_agent, '' ],
-    'Sales People'  => [ \%config_sales, '' ],
-    'separator2'    => '', #its a separator!
-    'Customers'     => [ \%config_cust, '' ],
-    #or this? 'Customers and Contacts' => [ \%config_cust, '' ],
+    'Companies'     => [ \%config_agent, '' ],
   );
 }
+
+$config_menu{'Sales People'}  = [ \%config_sales, '' ]
+  if $curuser->access_right('Edit sales people');
+
+if ( $curuser->access_right('Configuration' ) ) {
+  $config_menu{'Employees'}  = [ \%config_employees, '' ];
+  $config_menu{'separator2'} = ''; #its a separator!
+  $config_menu{'Customers'}  = [ \%config_cust, '' ];
+    #or this? 'Customers and Contacts'
+}
+
 $config_menu{'Packages'} = [ \%config_pkg, '' ]
   if    $curuser->access_right('Configuration' )
      || $curuser->access_right('Edit package definitions')