X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fmenu.html;h=7abd76a2bccd3118a2140e435cc43f0df84e0a98;hp=938303521ac07302f27fdfcd9e8d4c3b905f0f7d;hb=7c0748c7e439cdbc14ced38c21e782f4669f9b15;hpb=499cb40e6576b8c14a66678038f1034b6a4a66ca diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 938303521..7abd76a2b 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -94,6 +94,11 @@ tie my %report_prospects, 'Tie::IxHash', 'Advanced prospect reports' => [ $fsurl. 'search/report_prospect_main.html', '' ], ; +tie my %report_quotations, 'Tie::IxHash', + 'List quotations' => [ $fsurl. 'search/quotation.html', '' ], + 'Advanced quotation reports' => [ $fsurl. 'search/report_quotation.html', '' ], +; + tie my %report_customers_lists, 'Tie::IxHash', 'by customer number' => [ $fsurl. 'search/cust_main.cgi?browse=custnum', '' ], 'by last name' => [ $fsurl. 'search/cust_main.cgi?browse=last', '' ], @@ -125,6 +130,8 @@ tie my %report_invoices, 'Tie::IxHash', 'Open invoices' => [ \%report_invoices_open, 'Open invoices' ], 'All invoices' => [ $fsurl. 'search/cust_bill.html?date', 'List all invoices' ], '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' ], ; tie my %report_discounts, 'Tie::IxHash', @@ -187,9 +194,13 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) { } elsif ( $svcdb eq 'svc_phone' ) { $report_svc{"${name}' total usage by time period"} = - [ $fsurl. 'search/report_svc_phone.html', + [ $fsurl. 'search/report_svc_phone_usage.html', 'Total usage (minutes, and amount billed) for the specified time period, per phone number.', ]; + $report_svc{"${name} by state"} = + [ $fsurl. 'search/phone_state.html', + 'Current or historical phone services broken down by state.', + ]; } @@ -200,10 +211,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)$/ - && $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' ) { @@ -226,13 +237,13 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) { } tie my %report_packages, 'Tie::IxHash'; -if ( $curuser->access_right('Edit package definitions') - || $curuser->access_right('Edit global package definitions') - ) -{ - $report_packages{'Package definitions (by # active)'} = [ $fsurl.'browse/part_pkg.cgi?active=1', 'Package definitions by number of active packages' ]; - $report_packages{'separator'} = ''; -} +$report_packages{'Package definitions (by # active)'} = [ $fsurl.'browse/part_pkg.cgi?active=1', 'Package definitions by number of active packages' ] + if $curuser->access_right('Edit package definitions') + || $curuser->access_right('Edit global package definitions'); +$report_packages{'Package costs'} = [ $fsurl.'graph/report_cust_pkg_cost.html', 'Package setup and recurring costs graph' ] + if $curuser->access_right('Financial reports'); +$report_packages{'separator'} = '' + if keys %report_packages; 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'} = ''; @@ -256,6 +267,8 @@ tie my %report_inventory, 'Tie::IxHash', tie my %report_rating, 'Tie::IxHash'; $report_rating{'RADIUS sessions'} = [ $fsurl.'search/sqlradius.html', '' ] if $curuser->access_right("Usage: RADIUS sessions"); +$report_rating{'RADIUS data usage'} = [ $fsurl.'search/report_sqlradius_usage.html', '' ] + if $curuser->access_right("Usage: RADIUS sessions"); $report_rating{'Call Detail Records (CDRs)'} = [ $fsurl.'search/report_cdr.html', '' ] if $curuser->access_right("Usage: Call Detail Records (CDRs)"); $report_rating{'Unrateable CDRs'} = [ $fsurl.'search/cdr.html?freesidestatus=failed;cdrbatchnum=_ALL_' ] @@ -306,21 +319,40 @@ $report_payments{'Unapplied Payment Aging'} = [ $fsurl.'search/report_unapplied_ $report_payments{'Deleted Payments / Payment history table'} = [ $fsurl.'search/report_h_cust_pay.html', 'Deleted payments / payment history table' ] if $conf->exists('payment-history-report'); +tie my %report_credits, 'Tie::IxHash', + 'Credit Report' => [ $fsurl.'search/report_cust_credit.html', 'Credit report (by employee and/or date range)' ], + '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)' ], +; + +tie my %report_refunds, 'Tie::IxHash', + 'Refund Report' => [ $fsurl.'search/report_cust_refund.html', 'Refund report (by type and/or date range)' ], + 'Unapplied Refunds' => [ $fsurl.'search/report_cust_refund.html?unapplied=1', 'Unapplied refund report (by type and/or date range)' ], +; + +tie my %report_sales, 'Tie::IxHash', + 'Sales, Credits and Receipts' => [ $fsurl.'graph/report_money_time.html', 'Sales, credits and receipts summary graph' ], + 'Daily Sales, Credits and Receipts' => [ $fsurl.'graph/report_money_time_daily.html', 'Sales, credits and receipts (broken down by day) summary graph' ], + 'Sales Report' => [ $fsurl.'graph/report_cust_bill_pkg.html', 'Sales report and graph (by agent, package class and/or date range)' ], + 'Rated Call Sales Report' => [ $fsurl.'graph/report_cust_bill_pkg_detail.html', 'Sales report and graph (by agent, package class, usage class and/or date range)' ], + 'Sales with Advertising Source' => [ $fsurl.'search/report_cust_bill_pkg_referral.html' ], +; + +tie my %report_commissions, 'Tie::IxHash', + 'Agent' => [ $fsurl.'search/report_agent_commission.html' ], + 'Sales Person' => [ $fsurl.'search/report_sales_commission.html' ], + 'Sales Person per package' => [ $fsurl.'search/report_sales_commission_pkg.html' ], + 'Employee' => [ $fsurl.'search/report_employee_commission.html', '' ] +; + tie my %report_financial, 'Tie::IxHash'; -if($curuser->access_right('Financial reports')) { +if( $curuser->access_right('Financial reports') ) { %report_financial = ( - 'Sales, Credits and Receipts' => [ $fsurl.'graph/report_money_time.html', 'Sales, credits and receipts summary graph' ], - 'Daily Sales, Credits and Receipts' => [ $fsurl.'graph/report_money_time_daily.html', 'Sales, credits and receipts (broken down by day) summary graph' ], - 'Sales Report' => [ $fsurl.'graph/report_cust_bill_pkg.html', 'Sales report and graph (by agent, package class and/or date range)' ], - 'Rated Call Sales Report' => [ $fsurl.'graph/report_cust_bill_pkg_detail.html', 'Sales report and graph (by agent, package class, usage class and/or date range)' ], - 'Employee Commission Report' => [ $fsurl.'search/report_employee_commission.html', '' ], - 'Credit Report' => [ $fsurl.'search/report_cust_credit.html', 'Credit report (by employee and/or date range)' ], - 'Unapplied Credits' => [ $fsurl.'search/report_cust_credit.html?unapplied=1', 'Unapplied credit report (by type and/or date range)' ], - 'Refund Report' => [ $fsurl.'search/report_cust_refund.html', 'Refund report (by type and/or date range)' ], - 'Unapplied Refunds' => [ $fsurl.'search/report_cust_refund.html?unapplied=1', 'Unapplied refund report (by type and/or date range)' ], - 'Package Costs Report' => [ $fsurl.'graph/report_cust_pkg_cost.html', 'Package setup and recurring costs graph' ], - 'Employee Audit Report' => [ $fsurl.'search/report_employee_audit.html', 'Employee audit report' ], + 'Sales' => [ \%report_sales, 'Sales reports', ], + 'Commissions' => [ \%report_commissions, 'Commission reports', ], + 'Credits' => [ \%report_credits, 'Credit reports', ], + 'Refunds' => [ \%report_refunds, 'Refund reports', ], ); $report_financial{'A/R Aging'} = [ $fsurl.'search/report_receivables.html', 'Accounts Receivable Aging report' ]; $report_financial{'Prepaid Income'} = [ $fsurl.'search/report_prepaid_income.html', 'Prepaid income (unearned revenue) report' ]; @@ -330,6 +362,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')) { @@ -338,42 +373,66 @@ 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{'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.' ], + if $curuser->access_right('View system logs') + || $curuser->access_right('Configuration'); +$report_logs{'Outgoing messages'} = [ $fsurl.'search/cust_msg.html', 'View outgoing message log' ] + if $curuser->access_right('View email logs') + || $curuser->access_right('Configuration'); + tie my %report_menu, 'Tie::IxHash'; -$report_menu{'Prospects'} = [ \%report_prospects, 'Prospect reports' ] +$report_menu{'Prospects'} = [ \%report_prospects, 'Prospect reports' ] if $curuser->access_right('List prospects'); -$report_menu{'Customers'} = [ \%report_customers, 'Customer reports' ] +$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'); -$report_menu{'Invoices'} = [ \%report_invoices, 'Invoice reports' ] +$report_menu{'Invoices'} = [ \%report_invoices, 'Invoice reports' ] if $curuser->access_right('List invoices'); -$report_menu{'Discounts'} = [ \%report_discounts, 'Discount reports' ] +$report_menu{'Discounts'} = [ \%report_discounts, 'Discount reports' ] if $curuser->access_right('Financial reports'); -$report_menu{'Payments'} = [ \%report_payments, 'Payment reports' ] +$report_menu{'Payments'} = [ \%report_payments, 'Payment reports' ] if $curuser->access_right('Financial reports'); -$report_menu{'Packages'} = [ \%report_packages, 'Package reports' ] +$report_menu{'Packages'} = [ \%report_packages, 'Package reports' ] if $curuser->access_right('List packages'); -$report_menu{'Services'} = [ \%report_services, 'Services reports' ] +$report_menu{'Services'} = [ \%report_services, 'Services reports' ] if $curuser->access_right('List services'); -$report_menu{'Inventory'} = [ \%report_inventory, 'Inventory reports' ] +$report_menu{'Inventory'} = [ \%report_inventory, 'Inventory reports' ] if $curuser->access_right('Configuration'); #XXX List inventory? -$report_menu{'Usage'} = [ \%report_rating, 'Usage reports' ] +$report_menu{'Usage'} = [ \%report_rating, 'Usage reports' ] if $curuser->access_right('List rating data'); -$report_menu{'Tickets'} = [ \%report_ticketing, 'Ticket reports' ] +$report_menu{'Tickets'} = [ \%report_ticketing, 'Ticket reports' ] if $conf->config('ticket_system') ;#&& FS::TicketSystem->access_right(\%session, 'Something'); -$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{'SQL Query'} = [ $fsurl.'search/report_sql.html', 'SQL Query' ] +$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'] 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 from CSV file' => [ $fsurl.'misc/cust_main_note-import.html', '' ], - 'One-time charges from CSV file' => [ $fsurl.'misc/cust_main-import_charges.cgi', '' ], - 'Payments from CSV file' => [ $fsurl.'misc/cust_pay-import.cgi', '' ], + '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', '' ], ; @@ -424,14 +483,14 @@ $tools_menu{'Job Queue'} = [ $fsurl.'search/queue.html', 'View pending job queu if $curuser->access_right('Job queue'); $tools_menu{'Ticketing'} = [ \%tools_ticketing, 'Ticketing tools' ] if $conf->config('ticket_system'); +$tools_menu{'Customer email settings'} = [ $fsurl.'misc/manage_cust_email.html' ] + if $curuser->access_right('Edit customer'); $tools_menu{'Business card scan'} = [ $fsurl.'edit/prospect_main-upload.html' ] if $curuser->access_right('New prospect'); $tools_menu{'Time Queue'} = [ $fsurl.'search/report_timeworked.html', 'View pending support time' ] if $curuser->access_right('Time queue'); $tools_menu{'Attachments'} = [ $fsurl.'browse/cust_attachment.html', 'View customer attachments' ] if !$conf->config('disable_cust_attachment') and $curuser->access_right('View attachments') and $curuser->access_right('Browse attachments'); -$tools_menu{'Outgoing messages'} = [ $fsurl.'search/cust_msg.html', 'View outgoing message log' ] #shouldn't this be in the reports menu? - if $curuser->access_right('View email logs'); $tools_menu{'Importing'} = [ \%tools_importing, 'Import tools' ] if $curuser->access_right('Import'); $tools_menu{'Exporting'} = [ \%tools_exporting, 'Export tools' ] @@ -440,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', @@ -451,10 +511,15 @@ tie my %config_broadband, 'Tie::IxHash', 'Routers' => [ $fsurl.'browse/router.cgi', 'Broadband access routers' ], 'Address blocks' => [ $fsurl.'browse/addr_block.cgi', 'Manage address blocks and block assignments to broadband routers' ], ; +if ( $curuser->access_right('Broadband global configuration') ) { + $config_broadband{'Address ranges'} = + [ $fsurl.'browse/addr_range.html', 'Designate special address ranges' ]; +} 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', @@ -462,6 +527,22 @@ tie my %config_radius, 'Tie::IxHash', 'RADIUS Clients' => [ $fsurl.'browse/nas.html', 'Manage RADIUS clients' ], ; +tie my %config_cable, 'Tie::IxHash', + 'Cable providers' => [ $fsurl.'browse/cable_provider.html', '' ], + 'Cable modem models' => [ $fsurl.'browse/cable_model.html', '' ], +; + +tie my %config_alarm, 'Tie::IxHash', + 'Alarm system vendors' => [ $fsurl.'browse/alarm_system.html', '' ], + 'Alarm system types' => [ $fsurl.'browse/alarm_type.html', '' ], + 'Alarm central stations' => [ $fsurl.'browse/alarm_station.html', '' ], +; + +tie my %config_conferencing, 'Tie::IxHash', + 'Conferencing types' => [ $fsurl.'browse/conferencing_type.html', '' ], + 'Quality levels' => [ $fsurl.'browse/conferencing_quality.html', '' ], +; + tie my %config_export_svc, 'Tie::IxHash', (); if ( $curuser->access_right('Configuration') ) { $config_export_svc{'Service definitions'} = [ $fsurl.'browse/part_svc.cgi', 'Services are items you offer to your customers' ]; @@ -476,6 +557,12 @@ $config_export_svc{'Phone'} = [ \%config_phone, '' ] if $curuser->access_right('Configuration'); $config_export_svc{'RADIUS'} = [ \%config_radius, '' ] if $curuser->access_right('Configuration'); +$config_export_svc{'Cable'} = [ \%config_cable, '' ] + if $curuser->access_right('Configuration'); +$config_export_svc{'Conferencing'} = [ \%config_conferencing, '' ] + if $curuser->access_right('Configuration'); +$config_export_svc{'Alarm'} = [ \%config_alarm, '' ] + if $curuser->access_right(['Alarm configuration', 'Alarm global configuration']); $config_export_svc{'Hardware types'} = [ $fsurl.'browse/hardware_class.html', 'Set up hardware type catalog' ] if $curuser->access_right('Configuration'); @@ -498,7 +585,12 @@ 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, '' ]; } @@ -520,7 +612,7 @@ tie my %config_agent, 'Tie::IxHash', ; tie my %config_sales, 'Tie::IxHash', - 'Sales' => [ $fsurl.'browse/sales.cgi', 'Sales bring in new business.' ], + 'Sales People' => [ $fsurl.'browse/sales.html', 'Sales people bring in new business.' ], ; tie my %config_billing_rates, 'Tie::IxHash', @@ -540,9 +632,12 @@ $config_billing{'Billing events'} = [ $fsurl.'browse/part_event.html', 'Billing || $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! $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') @@ -554,8 +649,18 @@ 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.' ]; + + $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 @@ -612,14 +717,14 @@ $config_misc{'Advertising sources'} = [ $fsurl.'browse/part_referral.html', 'Whe || $curuser->access_right('Edit global advertising sources'); if ( $curuser->access_right('Configuration') ) { $config_misc{'Custom fields'} = [ $fsurl.'browse/part_virtual_field.html', 'Locally defined fields', ]; - $config_misc{'Message catalog'} = [ $fsurl.'browse/msgcat.html', 'Change error messages and other customizable labels for each locale' ]; + $config_misc{'Translation strings'} = [ $fsurl.'browse/msgcat.html', 'Translations and other customizable labels for each locale' ]; } $config_misc{'Inventory classes and inventory'} = [ $fsurl.'browse/inventory_class.html', 'Setup inventory classes and stock inventory' ] if $curuser->access_right('Edit inventory') || $curuser->access_right('Edit global inventory') || $curuser->access_right('Configuration'); -$config_misc{'FTP targets'} = [ $fsurl.'browse/ftp_target.html', 'FTP servers for billing and payment processing' ] +$config_misc{'Upload targets'} = [ $fsurl.'browse/upload_target.html', 'Billing and payment upload destinations' ] if $curuser->access_right('Configuration'); tie my %config_menu, 'Tie::IxHash'; @@ -627,24 +732,40 @@ if ( $curuser->access_right('Configuration' ) ) { %config_menu = ( 'Settings' => [ $fsurl.'config/config-view.cgi', '' ], 'separator' => '', #its a separator! - 'Employees' => [ \%config_employees, '' ], - 'Resellers' => [ \%config_agent, '' ], - 'Sales People' => [ \%config_sales, '' ], - 'separator2' => '', #its a separator! - 'Customers' => [ \%config_cust, '' ], - #or this? 'Customers and Contacts' => [ \%config_cust, '' ], + 'Companies' => [ \%config_agent, '' ], ); } + +$config_menu{'Sales People'} = [ \%config_sales, '' ] + if $curuser->access_right('Edit sales people'); + +if ( $curuser->access_right('Configuration' ) ) { + $config_menu{'Employees'} = [ \%config_employees, '' ]; + $config_menu{'separator2'} = ''; #its a separator! + $config_menu{'Customers'} = [ \%config_cust, '' ]; + #or this? 'Customers and Contacts' +} + $config_menu{'Packages'} = [ \%config_pkg, '' ] if $curuser->access_right('Configuration' ) || $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'); @@ -655,11 +776,14 @@ $config_menu{'Network Monitoring'} = [ \%config_nms, '' ] if $curuser->access_right('Configure network monitoring') && $conf->config('network_monitoring_system') eq 'Torrus_Internal'; -if ( $curuser->access_right('Configuration' ) - || $curuser->access_right('Edit advertising sources') - || $curuser->access_right('Edit global advertising sources') +if ( $curuser->access_right([ 'Configuration', + 'View templates', + 'View global templates', + 'Edit templates', + 'Edit global templates', + ]) ) { - $config_menu{separator9} = ''; + $config_menu{separator9} = '' if keys %config_menu; $config_menu{'Miscellaneous'} = [ \%config_misc, '' ]; } @@ -668,8 +792,8 @@ my $wiki = 'http://www.freeside.biz/mediawiki/index.php'; my $doc_link = $conf->config('support-key') ? "$wiki/Supported:Documentation" : $curuser->access_right('Configuration') - ? "$wiki/Freeside:2.1:Documentation" - : "$wiki/Freeside:2.1:Documentation:User"; + ? "$wiki/Freeside:4:Documentation" + : "$wiki/Freeside:2.1:Documentation:User"; #no page for other versions yet :/ eval "use RT;" if $conf->config('ticket_system') eq 'RT_Internal'; @@ -733,16 +857,23 @@ $menu{'Reports'} = [ \%report_menu, 'Lists, reporting and graphing' ] $menu{'Tools'} = [ \%tools_menu, 'Tools' ] if keys %tools_menu; $menu{'Configuration'} = [ \%config_menu, 'Configuration and setup' ] - if $curuser->access_right('Configuration') - || $curuser->access_right('Edit package definitions') - || $curuser->access_right('Edit global package definitions') - || $curuser->access_right('Edit billing events') - || $curuser->access_right('Edit global billing events') - || $curuser->access_right('Dialup configuration') - || $curuser->access_right('Wireless broadband configuration') - || $curuser->access_right('Phone configuration') - || $curuser->access_right('Edit advertising sources') - || $curuser->access_right('Edit global advertising sources'); + if $curuser->access_right([ 'Configuration', + 'Edit package definitions', + 'Edit global package definitions', + 'Edit billing events', + 'Edit global billing events', + 'Dialup configuration', + 'Wireless broadband configuration', + 'Phone configuration', + 'Alarm configuration', + 'Alarm global configuration', + 'Edit advertising sources', + 'Edit global advertising sources', + 'View templates', + 'View global templates', + 'Edit templates', + 'Edit global templates', + ]); $menu{'Help'} = [ \%help_menu, '' ];