add employee audit report, RT13350
[freeside.git] / httemplate / elements / menu.html
index 09b8e74..25aed48 100644 (file)
@@ -88,16 +88,12 @@ tie my %report_customers_lists, 'Tie::IxHash',
 ;
 $report_customers_lists{'by active trouble tickets'} = [ $fsurl. 'search/cust_main.cgi?browse=tickets', '' ]
   if $conf->config('ticket_system');
-
-tie my %report_customers_search, 'Tie::IxHash';
-$report_customers_search{'by ordering employee'} = [ $fsurl. 'search/cust_main-otaker.cgi' ]
-  if $curuser->access_right('Configuration');
+$report_customers_lists{'with USPS-unvalidated addresses'} = [ $fsurl. 'search/cust_main.cgi?browse=uspsunvalid', '' ]
+  if $conf->config('usps_webtools-userid') && $conf->config('usps_webtools-password');
 
 tie my %report_customers, 'Tie::IxHash';
 $report_customers{'List customers'} = [ \%report_customers_lists, 'List customers' ]
   if $curuser->access_right('List customers');
-$report_customers{'Search customers'} = [ \%report_customers_search, 'Search customers' ]
-  if keys %report_customers_search;
 $report_customers{'Zip code distribution'}     = [ $fsurl. 'search/report_cust_main-zip.html', 'Zip codes by number of customers' ];
 $report_customers{'Advanced customer reports'} = [ $fsurl. 'search/report_cust_main.html', 'by status, signup date, agent, etc.' ]
   if    $curuser->access_right('List customers')
@@ -130,6 +126,12 @@ if ( $curuser->access_right('Configuration') ) {
   $report_services{'Service definitions'} =  [ $fsurl.'browse/part_svc.cgi?orderby=active', 'Service definitions by number of active packages' ];
   $report_services{'separator'} =  '';
 }
+
+if ( $curuser->access_right('List services') ) {
+  $report_services{'Unprovisioned services'} =  [ $fsurl.'search/report_unprovisioned_services.html', 'Unprovisioned services' ];
+  $report_services{'separator2'} =  '';
+}
+
 foreach my $svcdb ( FS::part_svc->svc_tables() ) {
 
   my $name =        "FS::$svcdb"->table_info->{'name_plural'}
@@ -190,6 +192,13 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) {
       [ $fsurl."search/report_$svcdb.html", '' ];
   }
 
+  if ( $svcdb eq 'svc_phone' ) {
+    $report_svc{"Phone number (DID) availability"} =
+      [ $fsurl."search/report_phone_avail.html", '' ];
+    $report_svc{"Inventory/Provisioning Status"} =
+      [ $fsurl."search/phone_inventory_provisioned.html", '' ];
+  }
+
   $report_services{$name} = [ \%report_svc, $longname ];
 
 }
@@ -224,6 +233,7 @@ tie my %report_rating, 'Tie::IxHash',
   'RADIUS sessions' => [ $fsurl.'search/sqlradius.html', '' ],
   'Call Detail Records (CDRs)' => [ $fsurl.'search/report_cdr.html', '' ],
   'Time worked' => [ $fsurl.'search/report_rt_transaction.html', '' ],
+  'Time worked summary' => [ $fsurl.'search/report_rt_ticket.html', '' ],
 ;
 
 tie my %report_ticketing_statistics, 'Tie::IxHash',
@@ -263,12 +273,15 @@ $report_payments{'Unapplied Payments'} = [ $fsurl.'search/report_cust_pay.html?u
 $report_payments{'Payment Batches'} = [ $fsurl.'search/pay_batch.html', 'Payment batches (by status and/or date range)' ]
   if $conf->exists('batch-enable') || $conf->config('batch-enable_payby');
 $report_payments{'Unapplied Payment Aging'} = [ $fsurl.'search/report_unapplied_cust_pay.html', 'Unapplied payment aging report' ];
+$report_payments{'Deleted Payments / Payment history table'} = [ $fsurl.'search/report_h_cust_pay.html', 'Deleted payments / payment history table' ]
+  if $conf->exists('payment-history-report');
 
 tie my %report_financial, 'Tie::IxHash';
 if($curuser->access_right('Financial reports')) {
 
   %report_financial = (
     'Sales, Credits and Receipts' => [ $fsurl.'graph/report_money_time.html', 'Sales, credits and receipts summary graph' ],
+    'Daily Sales, Credits and Receipts' => [ $fsurl.'graph/report_money_time_daily.html', 'Sales, credits and receipts (broken down by day) summary graph' ],
     'Sales Report' => [ $fsurl.'graph/report_cust_bill_pkg.html', 'Sales report and graph (by agent, package class and/or date range)' ],
     'Rated Call Sales Report' => [ $fsurl.'graph/report_cust_bill_pkg_detail.html', 'Sales report and graph (by agent, package class, usage class and/or date range)' ],
     'Employee Commission Report' => [ $fsurl.'search/report_employee_commission.html', '' ],
@@ -277,12 +290,14 @@ if($curuser->access_right('Financial reports')) {
     'Refund Report' => [ $fsurl.'search/report_cust_refund.html', 'Refund report (by type and/or date range)' ],
     'Unapplied Refunds' => [ $fsurl.'search/report_cust_refund.html?unapplied=1', 'Unapplied refund report (by type and/or date range)' ],
     'Package Costs Report' => [ $fsurl.'graph/report_cust_pkg_cost.html', 'Package setup and recurring costs graph' ],
+    'Employee Audit Report' => [ $fsurl.'search/report_employee_audit.html', 'Employee audit report' ],
   );
   $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');
+  $report_financial{'Customer Accounting Summary'} = [ $fsurl.'search/report_customer_accounting_summary.html', 'Customer accounting summary report' ];
 
 } elsif($curuser->access_right('Receivables report')) {
 
@@ -363,16 +378,22 @@ $tools_menu{'Quick payment entry'} =  [ $fsurl.'misc/batch-cust_pay.html', 'Ente
 $tools_menu{'Process payment batches'} = [ $fsurl.'search/pay_batch.cgi?magic=_date;open=1;intransit=1', 'Process credit card and electronic check batches' ]
   if ( $conf->exists('batch-enable') || $conf->config('batch-enable_payby') )
      && $curuser->access_right('Process batches');
-$tools_menu{'Process invoice batches'} = [ $fsurl.'search/bill_batch.cgi' ] 
-  if ( $conf->exists('invoice_print_pdf') );
+$tools_menu{'Download invoice batches'} = [ $fsurl.'search/bill_batch.cgi' ] 
+  if $conf->exists('invoice_print_pdf');
+$tools_menu{'Bulk DID Orders'} =  [ $fsurl.'browse/did_order.html', 'View/manage bulk DID orders' ]
+  if $curuser->access_right('Import');
 $tools_menu{'Job Queue'} =  [ $fsurl.'search/queue.html', 'View pending job queue' ]
   if $curuser->access_right('Job queue');
 $tools_menu{'Ticketing'} = [ \%tools_ticketing, 'Ticketing tools' ]
   if $conf->config('ticket_system');
+$tools_menu{'Business card scan'} = [ $fsurl.'edit/prospect_main-upload.html' ]
+  if $curuser->access_right('New prospect');
 $tools_menu{'Time Queue'} =  [ $fsurl.'search/report_timeworked.html', 'View pending support time' ]
   if $curuser->access_right('Time queue');
 $tools_menu{'Attachments'} = [ $fsurl.'browse/cust_attachment.html', 'View customer attachments' ]
   if !$conf->config('disable_cust_attachment') and $curuser->access_right('View attachments') and $curuser->access_right('Browse attachments');
+$tools_menu{'Outgoing messages'} = [ $fsurl.'search/cust_msg.html', 'View outgoing message log' ]
+  if $curuser->access_right('View customers of all agents');
 $tools_menu{'Importing'} =  [ \%tools_importing, 'Import tools' ]
   if $curuser->access_right('Import');
 $tools_menu{'Exporting'} =  [ \%tools_exporting, 'Export tools' ]
@@ -417,6 +438,9 @@ tie my %config_cust, 'Tie::IxHash',
   'Customer categories' =>  [ $fsurl.'browse/cust_category.html', 'Customer categories define groups of customer classes.' ],
 ;
 
+$config_cust{'Customer note classes'} = [ $fsurl.'browse/cust_note_class.html', 'Customer note classes define groups of notes for reporting.' ]
+    if ($conf->exists('note-classes') && $conf->config('note-classes') > 0);
+
 tie my %config_agent, 'Tie::IxHash',
   'Agent types' => [ $fsurl.'browse/agent_type.cgi', 'Agent types define groups of package definitions that you can then assign to particular agents' ],
   'Agents'      => [ $fsurl.'browse/agent.cgi', 'Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their type)' ],
@@ -476,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' ],
 ;
 
 tie my %config_misc, 'Tie::IxHash';
@@ -552,9 +577,19 @@ $help_menu{"About RT v$RT::VERSION"} = [ 'http://www.bestpractical.com/rt', 'Req
   if $conf->config('ticket_system') eq 'RT_Internal';
 
 
-tie my %menu, 'Tie::IxHash',
-  'Billing Main'   => [ $fsurl, 'Billing start page', ],
-;
+tie my %menu, 'Tie::IxHash';
+
+if ( $conf->config('menu-prepend_links')) {
+  my @links = split(/\n/, $conf->config('menu-prepend_links'));
+  foreach my $link (@links) {
+    $link =~ /^\s*(\S+)\s+(.*?)(\s*\(([^\)]*)\))?$/ or next;
+    my($url, $label, $alt) = ($1, $2, $4);
+    $menu{$label} = [ $url, $alt ];
+  }
+}
+
+$menu{'Billing Main'} = [ $fsurl, 'Billing start page', ];
+
 if ( $conf->config('ticket_system') ) {
   $menu{'Ticketing Main'} =
     [