remove ancient invoice events
[freeside.git] / httemplate / elements / menu.html
index b4ecdc4..548dd9a 100644 (file)
@@ -89,10 +89,16 @@ my $curuser = $FS::CurrentUser::CurrentUser;
 
 #XXX Active tickets not assigned to a customer
 
-tie my %report_prospects, 'Tie::IxHash',
-  'List prospects' => [ $fsurl. 'search/prospect_main.html', '' ],
-  'Advanced prospect reports' => [ $fsurl. 'search/report_prospect_main.html', '' ],
-;
+tie my %report_prospects, 'Tie::IxHash';
+if ( $curuser->access_right('List prospects') ) {
+  $report_prospects{'List prospects'} = [ $fsurl. 'search/prospect_main.html', '' ];
+  $report_prospects{'Advanced prospect reports'} = [ $fsurl. 'search/report_prospect_main.html', '' ];
+}
+$report_prospects{'separator'} = ''
+  if $curuser->access_right('List prospects')
+  && $curuser->access_right('List contacts');
+$report_prospects{'Prospect contacts'} = [ $fsurl. 'search/report_contact.html?link=prospect_main', '' ]
+  if $curuser->access_right('List contacts');
 
 tie my %report_quotations, 'Tie::IxHash',
   'List quotations' => [ $fsurl. 'search/quotation.html', '' ],
@@ -118,6 +124,11 @@ $report_customers{'Customer churn report'} =  [ $fsurl.'graph/report_cust_churn.
 $report_customers{'Signup date report'}        = [ $fsurl. 'graph/report_signupdate.html',     'Signup date report (by date of signup)' ];
 $report_customers{'Advanced customer reports'} = [ $fsurl. 'search/report_cust_main.html',     'by status, signup date, agent, etc.' ]
   if $curuser->access_right('Advanced customer search');
+if ( $curuser->access_right('List contacts') ) {
+  $report_customers{'separator'} = '';
+  $report_customers{'Customer contacts'} = [ $fsurl. 'search/report_contact.html?link=cust_main' ];
+  $report_customers{'Customer stored payment information'} = [ $fsurl. 'search/report_cust_payby.html' ];
+}
 
 tie my %report_invoices_open, 'Tie::IxHash',
   'All open invoices' => [ $fsurl.'search/cust_bill.html?OPEN_date', 'All invoices with an unpaid balance' ],
@@ -306,8 +317,6 @@ tie my %report_ticketing, 'Tie::IxHash',
 tie my %report_bill_event, 'Tie::IxHash',
   'All billing events' => [ $fsurl.'search/report_cust_event.html', 'All billing events for a date range' ],
   'Billing event errors' => [ $fsurl.'search/report_cust_event.html?failed=1', 'Failed credit cards, processor or printer problems, etc.' ],
-#  'All invoice events' => [ $fsurl.'search/cust_bill_event.html', 'Reports on deprecated, old-style invoice events for a date range' ],
-#  'Invoice event errors' => [ $fsurl.'search/cust_bill_event.html?failed=1', 'Reports on deprecated, old-style events for failed credit cards, processor or printer problems, etc.' ],
 ;
 
 tie my %report_payments, 'Tie::IxHash',
@@ -326,6 +335,7 @@ $report_payments{'Deleted Payments / Payment history table'} = [ $fsurl.'search/
 
 tie my %report_credits, 'Tie::IxHash',
   'Credit Report' => [ $fsurl.'search/report_cust_credit.html', 'Credit report (by employee and/or date range)' ],
+  'Credit package source detail' => [ $fsurl.'search/report_cust_credit_source_bill_pkg.html', 'Line-item detail for triggered package credits' ],
   'Credit application detail' => [ $fsurl.'search/report_cust_credit_bill_pkg.html', 'Line item application detail' ],
   'Unapplied Credits' => [ $fsurl.'search/report_cust_credit.html?unapplied=1', 'Unapplied credit report (by type and/or date range)' ],
 ;
@@ -399,11 +409,13 @@ $report_logs{'Outgoing messages'} = [ $fsurl.'search/cust_msg.html', 'View outgo
 
 tie my %report_menu, 'Tie::IxHash';
 $report_menu{'Prospects'}      = [ \%report_prospects, 'Prospect reports' ]
-  if $curuser->access_right('List prospects');
+  if $curuser->access_right('List prospects')
+  || $curuser->access_right('List contacts');
 $report_menu{'Quotations'}     = [ \%report_quotations, 'Quotation reports' ]
   if $curuser->access_right('List quotations');
 $report_menu{'Customers'}      = [ \%report_customers, 'Customer reports'  ]
-  if $curuser->access_right('List customers');
+  if $curuser->access_right('List customers')
+  || $curuser->access_right('List contacts');
 $report_menu{'Invoices'}       =  [ \%report_invoices,  'Invoice reports'   ]
   if $curuser->access_right('List invoices');
 $report_menu{'Discounts'}      =  [ \%report_discounts, 'Discount reports'  ]
@@ -433,12 +445,13 @@ $report_menu{'SQL Query'}      = [ $fsurl.'search/report_sql.html', 'SQL Query']
   if $curuser->access_right('Raw SQL');
 
 tie my %tools_importing, 'Tie::IxHash',
-  'Customers' => [ $fsurl.'misc/cust_main-import.cgi', '' ],
-  'Customer packages' => [ $fsurl.'misc/cust_pkg-import.html', '' ],
-  'Customer comments' => [ $fsurl.'misc/cust_main_note-import.html', '' ],
-  'One-time charges' => [ $fsurl.'misc/cust_main-import_charges.cgi', '' ],
-  'Payments' => [ $fsurl.'misc/cust_pay-import.cgi', '' ],
-  'Credits' => [ $fsurl.'misc/cust_credit-import.html', '' ],
+  'Customers'            => [ $fsurl.'misc/cust_main-import.cgi', '' ],
+  'Package definitions'  => [ $fsurl.'misc/part_pkg-import.html', '' ],
+  'Customer packages'    => [ $fsurl.'misc/cust_pkg-import.html', '' ],
+  'Customer comments'    => [ $fsurl.'misc/cust_main_note-import.html', '' ],
+  'One-time charges'     => [ $fsurl.'misc/cust_main-import_charges.cgi', '' ],
+  'Payments'             => [ $fsurl.'misc/cust_pay-import.cgi', '' ],
+  'Credits'              => [ $fsurl.'misc/cust_credit-import.html', '' ],
   'Phone numbers (DIDs)' => [ $fsurl.'misc/phone_avail-import.html', '' ],
   'Call Detail Records (CDRs)' => [ $fsurl.'misc/cdr-import.html', '' ],
 ;
@@ -652,7 +665,6 @@ $config_billing{'Billing events'} = [ $fsurl.'browse/part_event.html', 'Billing
     if $curuser->access_right('Edit billing events')
     || $curuser->access_right('Edit global billing events');
 if ( $curuser->access_right('Configuration') ) {
-  #$config_billing{'Invoice events'}         = [ $fsurl.'browse/part_bill_event.cgi', 'Deprecated, old-style actions for overdue invoices' ];
   $config_billing{'Invoice configurations'}      = [ $fsurl.'browse/invoice_conf.html', 'Adjust invoice settings for special-purpose notices' ];
   $config_billing{'Invoice templates'}      = [ $fsurl.'browse/invoice_template.html', 'Edit templates for HTML, plaintext and typeset invoices' ];
   $config_billing{'separator'} = ''; #its a separator!