X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fmenu.html;h=8be8a5fd5add05c6403d61b63848b43b78d89340;hp=0b74b2105a67fb0d7dd897d27c4a5c41b695f576;hb=dd7dff52ca8fb19725b52202b32facd41917ed80;hpb=1bea3acc9951c272bd9f5f872d3262c9380e067f diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 0b74b2105..8be8a5fd5 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', @@ -275,7 +290,8 @@ $report_rating{'Unrateable CDRs'} = [ $fsurl.'search/cdr.html?freesidestatus=fai if $curuser->access_right("Usage: Unrateable CDRs"); if ( $curuser->access_right("Usage: Time worked") ) { $report_rating{'Time worked'} = [ $fsurl.'search/report_rt_transaction.html', '' ]; - $report_rating{'Time worked summary'} = [ $fsurl.'search/report_rt_ticket.html', '' ]; + $report_rating{'Time worked summary per ticket'} = [ $fsurl.'search/report_rt_ticket.html', '' ]; + $report_rating{'Time worked summary per customer'} = [ $fsurl.'search/report_rt_cust.html', '' ]; } tie my %report_ticketing_statistics, 'Tie::IxHash', @@ -313,13 +329,14 @@ tie my %report_bill_event, 'Tie::IxHash', ; tie my %report_payments, 'Tie::IxHash', - 'Payments' => [ $fsurl.'search/report_cust_pay.html', 'Payment report (by type and/or date range)' ], + 'Payments' => [ $fsurl.'search/report_cust_pay.html', 'Payment report (by type and/or date range)' ], + 'Payment application detail' => [ $fsurl.'search/report_cust_bill_pay_pkg.html', 'Line item application detail' ], ; $report_payments{'Pending Payments'} = [ $fsurl.'search/cust_pay_pending.html?magic=_date;statusNOT=done', 'Pending real-time payments' ] if $curuser->access_right('View customer pending payments'); +$report_payments{'Unapplied Payments'} = [ $fsurl.'search/report_cust_pay.html?unapplied=1', 'Unapplied payment report (by type and/or date range)' ]; $report_payments{'Voided Payments'} = [ $fsurl.'search/report_cust_pay.html?void=1', 'Voided payment report (by type and/or date range)' ] if $curuser->access_right('View customer pending payments'); -$report_payments{'Unapplied Payments'} = [ $fsurl.'search/report_cust_pay.html?unapplied=1', 'Unapplied payment report (by type and/or date range)' ]; $report_payments{'Payment Batches'} = [ $fsurl.'search/pay_batch.html', 'Payment batches (by status and/or date range)' ] if $conf->exists('batch-enable') || $conf->config('batch-enable_payby'); $report_payments{'Unapplied Payment Aging'} = [ $fsurl.'search/report_unapplied_cust_pay.html', 'Unapplied payment aging report' ]; @@ -330,6 +347,7 @@ 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)' ], + 'Voided Credits' => [ $fsurl.'search/report_cust_credit_void.html', 'Voided credit report (by employee and/or date range)' ], ; tie my %report_refunds, 'Tie::IxHash', @@ -343,10 +361,16 @@ tie my %report_sales, 'Tie::IxHash', '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 Commissions' => [ $fsurl.'search/report_agent_commission.html' ], + 'Agent Commissions Per Package' => [ $fsurl.'search/report_agent_commission_pkg.html' ], 'Sales Person Commissions' => [ $fsurl.'search/report_sales_commission.html' ], - 'Sales Person Commission per package' => [ $fsurl.'search/report_sales_commission_pkg.html' ], + 'Sales Person Commissions Per Package' => [ $fsurl.'search/report_sales_commission_pkg.html' ], ; +$report_commissions{'Employee Commissions'} = [ $fsurl.'search/report_employee_commission.html', '' ] + if $curuser->access_right('Employees: Commission Report'); tie my %report_financial, 'Tie::IxHash'; if( $curuser->access_right('Financial reports') ) { @@ -355,6 +379,7 @@ if( $curuser->access_right('Financial reports') ) { 'Sales' => [ \%report_sales, 'Sales reports', ], 'Credits' => [ \%report_credits, 'Credit reports', ], 'Refunds' => [ \%report_refunds, 'Refund reports', ], + 'Commissions' => [ \%report_commissions, 'Commission 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' ]; @@ -364,6 +389,8 @@ 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; + $report_financial{'Monthly Sales and Taxes'} = [$fsurl.'search/tax_sales.html', 'Monthly sales and taxes report']; + # 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' ]; @@ -387,11 +414,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' ] @@ -422,12 +451,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', '' ], ; @@ -490,6 +520,9 @@ $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' ], @@ -533,6 +566,12 @@ tie my %config_alarm, 'Tie::IxHash', 'Alarm central stations' => [ $fsurl.'browse/alarm_station.html', '' ], ; +tie my %config_circuit, 'Tie::IxHash', + 'Circuit types' => [ $fsurl.'browse/circuit_type.html', '' ], + 'Circuit providers' => [ $fsurl.'browse/circuit_provider.html', '' ], + 'Termination types' => [ $fsurl.'browse/circuit_termination.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' ]; @@ -551,6 +590,8 @@ $config_export_svc{'Cable'} = [ \%config_cable, '' ] if $curuser->access_right('Configuration'); $config_export_svc{'Alarm'} = [ \%config_alarm, '' ] if $curuser->access_right(['Alarm configuration', 'Alarm global configuration']); +$config_export_svc{'Circuits'} = [ \%config_circuit, '' ] + if $curuser->access_right('Configuration'); $config_export_svc{'Hardware types'} = [ $fsurl.'browse/hardware_class.html', 'Set up hardware type catalog' ] if $curuser->access_right('Configuration'); @@ -645,6 +686,7 @@ if ( $curuser->access_right('Configuration') ) { $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{'Credit void reasons'} = [ $fsurl.'browse/reason.html?class=X', 'Credit void reasons explain why a credit was voided.' ]; } #XXX also to be unified @@ -699,10 +741,10 @@ $config_misc{'Message templates'} = [ $fsurl.'browse/msg_template.html', 'Templa $config_misc{'Advertising sources'} = [ $fsurl.'browse/part_referral.html', 'Where a customer heard about your service.' ] if $curuser->access_right('Edit advertising sources') || $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{'Translation strings'} = [ $fsurl.'browse/msgcat.html', 'Translations and other customizable labels for each locale' ]; -} +$config_misc{'Custom fields'} = [ $fsurl.'browse/part_virtual_field.html', 'Locally defined fields', ] + if $curuser->access_right('Edit custom fields'); +$config_misc{'Translation strings'} = [ $fsurl.'browse/msgcat.html', 'Translations and other customizable labels for each locale' ] + if $curuser->access_right('Configuration'); $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') @@ -741,8 +783,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');