agent-virtualize VoIP rates, RT#29183
[freeside.git] / httemplate / elements / menu.html
index 976f712..de5ea19 100644 (file)
@@ -380,6 +380,8 @@ tie my %report_payable, 'Tie::IxHash',
 tie my %report_logs, 'Tie::IxHash';
 $report_logs{'Billing events'} =  [ \%report_bill_event, 'Billing events' ]
   if $curuser->access_right('Billing event reports');
+$report_logs{'Credit limit incidents'} = [ $fsurl.'search/report_cust_main_credit_limit.html', '' ]
+  if $curuser->access_right('List rating data');
 $report_logs{'Employee activity'} = [ $fsurl.'search/report_employee_audit.html', '' ]
   if $curuser->access_right('Employees: Audit Report');
 $report_logs{'System log'} = [ $fsurl.'search/log.html', 'View system events and debugging information.' ],
@@ -497,6 +499,7 @@ $tools_menu{'Exporting'} =  [ \%tools_exporting, 'Export tools' ]
 tie my %config_employees, 'Tie::IxHash',
   'Employees' => [ $fsurl.'browse/access_user.html', 'Setup internal users' ],
   'Employee groups' => [ $fsurl.'browse/access_group.html', 'Employee groups allow you to control access to the backend' ],
+  'Installer availability' => [ $fsurl.'browse/sched_item.html', 'Installer availability' ],
 ;
 
 tie my %config_dialup, 'Tie::IxHash',
@@ -582,6 +585,10 @@ if ( $curuser->access_right('Configuration') ) {
   $config_pkg{'Package report classes'} =  [ $fsurl.'browse/part_pkg_report_option.html', 'Package classes define optional groups of packages for reporting only.' ];
   #eo package grouping sub-menu
 
+  if ( $curuser->access_right([ 'Edit fee definitions',
+                                'Edit global fee definitions' ]) ) {
+    $config_pkg{'Fees'} = [ $fsurl.'browse/part_fee.html', '' ];
+  }
   $config_pkg{'Discounts'} = [ $fsurl.'browse/discount.html', '' ];
   $config_pkg{'Discount classes'} = [ $fsurl.'browse/discount_class.html', '' ];
   $config_pkg{'Cancel/Suspend Reasons'} = [ \%config_pkg_reason, '' ];
@@ -608,15 +615,19 @@ tie my %config_sales, 'Tie::IxHash',
   'Sales People' => [ $fsurl.'browse/sales.html', 'Sales people bring in new business.' ],
 ;
 
-tie my %config_billing_rates, 'Tie::IxHash',
-  'Rate plans' => [ $fsurl.'browse/rate.cgi', 'Manage rate plans' ],
-  'Regions and prefixes' => [ $fsurl.'browse/rate_region.html', 'Manage regions and prefixes' ],
-  'Usage classes'  => [ $fsurl.'browse/usage_class.html', 'Usage classes define groups of usage for taxation.' ],
-  'Time periods' => [ $fsurl.'browse/rate_time.html', 'Time periods define days and hours for rate plans' ],
-  'Edit rates with Excel' => [ $fsurl.'misc/rate_edit_excel.html', 'Download and edit rates with Excel, then upload changes.' ], #"Edit with Excel" ?
-  'separator'     => '', #its a separator!
-  'Tiering plans' => [ $fsurl.'browse/rate_tier.html', 'Rating tiers' ],
-;
+tie my %config_billing_rates, 'Tie::IxHash';
+$config_billing_rates{'Rate plans'} = [ $fsurl.'browse/rate.cgi', 'Manage rate plans' ]
+  if $curuser->access_right('Edit CDR rates')
+  #|| $curuser->access_right('Edit global CDR rates')
+  || $curuser->access_right('Configuration');
+if ( $curuser->access_right('Configuration') ) {
+  $config_billing_rates{'Regions and prefixes'} = [ $fsurl.'browse/rate_region.html', 'Manage regions and prefixes' ];
+  $config_billing_rates{'Usage classes'} = [ $fsurl.'browse/usage_class.html', 'Usage classes define groups of usage for taxation.' ];
+  $config_billing_rates{'Time periods'} = [ $fsurl.'browse/rate_time.html', 'Time periods define days and hours for rate plans' ];
+  $config_billing_rates{'Edit rates with Excel'} = [ $fsurl.'misc/rate_edit_excel.html', 'Download and edit rates with Excel, then upload changes.' ]; #"Edit with Excel" ?
+  $config_billing_rates{'separator'} = ''; #its a separator!
+  $config_billing_rates{'Tiering plans'} = [ $fsurl.'browse/rate_tier.html', 'Rating tiers' ];
+}
 
 tie my %config_billing, 'Tie::IxHash';
 #  'Payment gateways'         => [ $fsurl.'browse/payment_gateway.html', 'Credit card and electronic check processors' ];
@@ -629,7 +640,10 @@ if ( $curuser->access_right('Configuration') ) {
   $config_billing{'Invoice templates'}      = [ $fsurl.'browse/invoice_template.html', 'Edit templates for HTML, plaintext and typeset invoices' ];
   $config_billing{'separator'} = ''; #its a separator!
   $config_billing{'Prepaid cards'}          = [ $fsurl.'search/prepay_credit.html', 'View outstanding cards, generate new cards' ];
-  $config_billing{'Call rates and regions'} = [ \%config_billing_rates, 'Manage rate plans, regions and prefixes for VoIP and call billing' ];
+}
+$config_billing{'Call rates and regions'} = [ \%config_billing_rates, 'Manage rate plans, regions and prefixes for VoIP and call billing' ]
+  if keys %config_billing_rates;
+if ( $curuser->access_right('Configuration') ) {
   $config_billing{'separator2'} = ''; #its a separator!
 
   my $config_taxes_name = 'Locales and tax rates'.
@@ -650,6 +664,10 @@ if ( $curuser->access_right('Configuration') ) {
   $config_billing{'separator4'} = ''; #its a separator!
   $config_billing{'Credit reasons'}  = [ $fsurl.'browse/reason.html?class=R', 'Credit reasons explain why a credit was issued.' ];
   $config_billing{'Credit reason types'}  = [ $fsurl.'browse/reason_type.html?class=R', 'Credit reason types define groups of reasons.' ];
+  
+  $config_billing{'separator5'} = ''; #its a separator!
+  $config_billing{'Refund reasons'}  = [ $fsurl.'browse/reason.html?class=F', 'Refund reasons explain why a refund was issued.' ];
+  $config_billing{'Refund reason types'}  = [ $fsurl.'browse/reason_type.html?class=F', 'Refund reason types define groups of reasons.' ];
 }
 
 #XXX also to be unified