accounts w/time remaining search
[freeside.git] / httemplate / elements / menu.html
index 42e2a83..5675c7b 100644 (file)
@@ -115,8 +115,11 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) {
 
   foreach my $sort ( @$sorts ) {
 
+    my $field_info = FS::part_svc->svc_table_fields($svcdb)->{$sort};
+    my $label = $field_info->{'label_sort'} || 'by '.$field_info->{'label'};
+
     my $title = "All $lcname";
-    $title .= " by ". FS::part_svc->svc_table_fields($svcdb)->{$sort}->{'label'}
+    $title .= " $label"
       if scalar(@$sorts) > 1;
 
     $report_svc{$title} =
@@ -141,6 +144,10 @@ if ( $curuser->access_right('Configuration') ) {
   $report_packages{'Package definitions'} =  [ $fsurl.'browse/part_pkg.cgi?active=1', 'Package definitions by number of active packages' ];
   $report_packages{'separator'} =  '';
 }
+if ( $curuser->access_right('Financial reports') ) {
+  $report_packages{'Package churn'} =  [ $fsurl.'graph/report_cust_pkg.html', 'Orders, suspensions and cancellations summary graph' ];
+  $report_packages{'separator2'} =  '';
+}
 $report_packages{'All customer packages'} =  [ $fsurl.'search/cust_pkg.cgi?pkgnum', 'List all customer packages', ];
 $report_packages{'Suspended customer packages'} =  [ $fsurl.'search/cust_pkg.cgi?magic=suspended', 'List suspended packages' ];
 $report_packages{'Customer packages with unconfigured services'} =  [ $fsurl.'search/cust_pkg.cgi?APKG_pkgnum', 'List packages which have provisionable services' ];
@@ -210,6 +217,8 @@ $tools_menu{'Process payment batches'} = [ $fsurl.'search/pay_batch.cgi?magic=_d
   if $conf->exists('batch-enable') && $curuser->access_right('Process batches');
 $tools_menu{'Job Queue'} =  [ $fsurl.'search/queue.html', 'View pending job queue' ]
   if $curuser->access_right('Job queue');
+$tools_menu{'Time Queue'} =  [ $fsurl.'search/timeworked.html', 'View pending support time' ]
+  if $curuser->access_right('Time queue');
 $tools_menu{'Importing'} =  [ \%tools_importing, 'Import tools' ]
   if $curuser->access_right('Import');
 $tools_menu{'Exporting'} =  [ \%tools_exporting, 'Export tools' ]