X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fmenu.html;h=3236bc14b3bedaab447ad6b79085e1b373b172a4;hb=2713274c36a5f7688810241157ff9cd2a3b87b1f;hp=976f712d00b6d4103992db87626bccf0b86b4856;hpb=12c74e8d7c58b6620a124275e125424fc5d9b66e;p=freeside.git diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 976f712d0..3236bc14b 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -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', '' ], @@ -113,9 +119,15 @@ tie my %report_customers, 'Tie::IxHash'; $report_customers{'List customers'} = [ \%report_customers_lists, 'List customers' ] if $curuser->access_right('List all customers'); $report_customers{'Zip code distribution'} = [ $fsurl. 'search/report_cust_main-zip.html', 'Zip codes by number of customers' ]; -$report_customers{'Customer signup report'} = [ $fsurl. 'graph/report_cust_signup.html', 'New customer signups by date' ], -$report_customers{'Advanced customer reports'} = [ $fsurl. 'search/report_cust_main.html', 'by status, signup date, agent, etc.' ] +$report_customers{'Customer signup report'} = [ $fsurl. 'graph/report_cust_signup.html', 'New customer signups by date' ]; +$report_customers{'Customer churn report'} = [ $fsurl.'graph/report_cust_churn.html', 'New customers, suspensions, and cancellations summary' ]; +$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' ]; +} tie my %report_invoices_open, 'Tie::IxHash', 'All open invoices' => [ $fsurl.'search/cust_bill.html?OPEN_date', 'All invoices with an unpaid balance' ], @@ -132,6 +144,9 @@ tie my %report_invoices, 'Tie::IxHash', 'Advanced invoice reports' => [ $fsurl.'search/report_cust_bill.html', 'by agent, date range, etc.' ], 'separator' => '', 'Line items' => [ $fsurl. 'search/report_cust_bill_pkg.html', 'Individual line item detail' ], + 'separator' => '', + 'Voided invoices' => [ $fsurl.'search/report_cust_bill_void.html', 'Search for voided invoices' ], + ; tie my %report_discounts, 'Tie::IxHash', @@ -255,8 +270,8 @@ $report_packages{'Suspended customer packages'} = [ $fsurl.'search/cust_pkg.cgi $report_packages{'Suspension summary'} = [ $fsurl.'search/cust_pkg_susp.html', 'Show suspension activity', ] if $curuser->access_right('Summarize packages'); $report_packages{'Customer packages with unconfigured services'} = [ $fsurl.'search/cust_pkg.cgi?APKG_pkgnum', 'List packages which have provisionable services' ]; -$report_packages{'FCC Form 477 packages'} = [ $fsurl.'search/report_477.html', 'Summarize packages by census tract for particular types' ] - if $conf->exists('cust_main-require_censustract'); +$report_packages{'FCC Form 477'} = [ $fsurl.'search/report_477.html' ] + if $conf->exists('part_pkg-show_fcc_options'); $report_packages{'Advanced package reports'} = [ $fsurl.'search/report_cust_pkg.html', 'by agent, date range, status, package definition' ]; tie my %report_inventory, 'Tie::IxHash', @@ -374,12 +389,15 @@ if( $curuser->access_right('Financial reports') ) { } # else $report_financial contains nothing. tie my %report_payable, 'Tie::IxHash', - 'Payables' => [ $fsurl. 'search/report_vend_bill.html' ], + 'Payables summary' => [ $fsurl. 'search/report_vend_main.html', 'Payables summary by vendor' ], + 'Payables detail' => [ $fsurl. 'search/report_vend_bill.html' ], ; 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.' ], @@ -391,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' ] @@ -493,10 +513,14 @@ $tools_menu{'Importing'} = [ \%tools_importing, 'Import tools' ] if $curuser->access_right('Import'); $tools_menu{'Exporting'} = [ \%tools_exporting, 'Export tools' ] if $curuser->access_right('Export'); +$tools_menu{'Status'} = [ $fsurl.'view/Status.html', 'System status' ] + if $curuser->access_right('Configuration'); # 'View system status'); + 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 +606,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 +636,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 +661,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 +685,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 @@ -756,8 +795,7 @@ if ( $curuser->access_right('Configuration') ) { } $config_menu{'Billing'} = [ \%config_billing, '' ] - if $curuser->access_right('Edit billing events') - || $curuser->access_right('Edit global billing events'); + if keys %config_billing; $config_menu{'Ticketing'} = [ \%config_ticketing, '' ] if $conf->config('ticket_system') && FS::TicketSystem->access_right(\%session, 'ShowConfigTab');