X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fmenu.html;h=a7411b79669b12b3bdb45cfc46399a2f3f4836c3;hp=14d36c31df8f3b455dc82ff315ad17cf04f7f0b7;hb=f264598260908d2442fe1aed2ce3784ce51254e6;hpb=06e353b743e7be88afa8fce50ea10f27ebb7adef diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 14d36c31d..a7411b796 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -207,10 +207,10 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) { ]; } - $report_svc{"Advanced $lcsname reports"} = - [ $fsurl."search/report_$svcdb.html", '' ] - if $svcdb =~ /^svc_(acct|broadband|hardware|phone)$/ - && $curuser->access_right("Services: $name: Advanced search"); + $report_svc{"Advanced $lcsname reports"} = + [ $fsurl."search/report_$svcdb.html", '' ] + if $svcdb =~ /^svc_(acct|broadband|hardware|phone)$/ + && $curuser->access_right("Services: $name: Advanced search"); if ( $svcdb eq 'svc_phone' ) { @@ -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')) { @@ -364,6 +369,10 @@ if( $curuser->access_right('Financial reports') ) { } # else $report_financial contains nothing. +tie my %report_payable, 'Tie::IxHash', + 'Payables' => [ $fsurl. 'search/report_vend_bill.html' ], +; + tie my %report_logs, 'Tie::IxHash'; $report_logs{'System log'} = [ $fsurl.'search/log.html', 'View system events and debugging information.' ], if $curuser->access_right('View system logs') @@ -397,12 +406,15 @@ $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' ] +$report_menu{'Financial (Receivables)'} = [ \%report_financial, 'Financial reports (Receivables)' ] if $curuser->access_right('Financial reports') or $curuser->access_right('Receivables report'); +$report_menu{'Financial (Payables)'} = [ \%report_payable, 'Financial reports (Payables)' ] + if $curuser->access_right('Financial reports'); + $report_menu{'Logs'} = [ \%report_logs, 'System and email logs' ] if (keys %report_logs); # empty if the user has no rights to it $report_menu{'SQL Query'} = [ $fsurl.'search/report_sql.html', 'SQL Query'] @@ -495,6 +507,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', @@ -581,8 +594,10 @@ $config_billing{'Billing events'} = [ $fsurl.'browse/part_event.html', 'Billing 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 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{'separator2'} = ''; #its a separator! my $config_taxes_name = 'Locales and tax rates'. ( $conf->exists('enable_taxproducts') @@ -594,6 +609,12 @@ if ( $curuser->access_right('Configuration') ) { if $conf->exists('enable_taxproducts'); $config_billing{'Tax classes'} = [ $fsurl. 'browse/part_pkg_taxclass.html', 'Tax classes' ]; + if ( $conf->config('currencies') ) { + $config_billing{'separator3'} = ''; #its a separator! + $config_billing{'Exchange rates'} = [ $fsurl.'edit/currency_exchange.html', 'Currency exchange rates' ]; + } + + $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.' ]; } @@ -667,8 +688,8 @@ if ( $curuser->access_right('Configuration' ) ) { %config_menu = ( 'Settings' => [ $fsurl.'config/config-view.cgi', '' ], 'separator' => '', #its a separator! + 'Companies' => [ \%config_agent, '' ], 'Employees' => [ \%config_employees, '' ], - 'Resellers' => [ \%config_agent, '' ], 'Sales People' => [ \%config_sales, '' ], 'separator2' => '', #its a separator! 'Customers' => [ \%config_cust, '' ], @@ -680,11 +701,21 @@ $config_menu{'Packages'} = [ \%config_pkg, '' ] || $curuser->access_right('Edit package definitions') || $curuser->access_right('Edit global package definitions'); -if ( $curuser->access_right('Configuration' ) ) { +if ( $curuser->access_right('Configuration') ) { $config_menu{'Services'} = [ \%config_export_svc, '' ]; $config_menu{separator3} = ''; } +tie my %config_vendor, 'Tie::IxHash', + 'Vendor classes' => [ $fsurl.'browse/vend_class.html', '' ], + 'Vendors' => [ $fsurl.'browse/vend_main.html', '' ], +; + +if ( $curuser->access_right('Configuration') ) { + $config_menu{'Vendors'} = [ \%config_vendor, '' ]; + $config_menu{separator4} = ''; +} + $config_menu{'Billing'} = [ \%config_billing, '' ] if $curuser->access_right('Edit billing events') || $curuser->access_right('Edit global billing events');