X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fmenu.html;h=c4ea9cd7cbd39658acd5f33b8329d2f6067ed5d1;hp=55645cf3125dd88fd43149963c56d818a31dd6f0;hb=f675734f1eda5b39f891a6fc8f2f29cbd2e36c35;hpb=9fd03716b831bd00a725a63edbe19cfe6b88aea0 diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 55645cf31..c4ea9cd7c 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -87,6 +87,21 @@ my $mobile = $opt{'mobile'} || 0; my $curuser = $FS::CurrentUser::CurrentUser; +# saved searches +tie my %report_saved_searches, 'Tie::IxHash'; +if ( my @searches = grep { $_->disabled eq '' } $curuser->saved_search ) { + foreach my $search (@searches) { + $report_saved_searches{ $search->searchname } = [ + # don't use query_string here; we don't want to override the format + $fsurl . $search->path . '?' . $search->params , '' + ]; + } + $report_saved_searches{'separator'} = ''; + $report_saved_searches{'My saved searches'} = + [ $fsurl. 'browse/saved_search.html', + 'Manage saved searches and subscriptions' ]; +} + #XXX Active tickets not assigned to a customer tie my %report_prospects, 'Tie::IxHash'; @@ -227,10 +242,12 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) { ]; } - $report_svc{"Advanced $lcsname reports"} = + if ( $curuser->access_right("Services: $name: Advanced search") + && $svcdb =~ /^svc_(acct|broadband|hardware|phone|fiber)$/ ) { + + $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' ) { @@ -273,6 +290,7 @@ $report_packages{'Suspension summary'} = [ $fsurl.'search/cust_pkg_susp.html', ' $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'} = [ $fsurl.'search/report_477.html' ] if $conf->exists('part_pkg-show_fcc_options'); +$report_packages{'Contract end dates'} = [ $fsurl.'search/report_cust_pkg-date.html?date=contract_end', 'Show packages by contract end date' ]; $report_packages{'Advanced package reports'} = [ $fsurl.'search/report_cust_pkg.html', 'by agent, date range, status, package definition' ]; tie my %report_inventory, 'Tie::IxHash', @@ -289,6 +307,8 @@ $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_' ] if $curuser->access_right("Usage: Unrateable CDRs"); +$report_rating{'Customer CDRs Profit/Loss'} = [ $fsurl.'search/report_customer_cdr_profit.html', 'Profit/loss from customer CDRs' ] + if $curuser->access_right('Financial reports'); if ( $curuser->access_right("Usage: Time worked") ) { $report_rating{'Time worked'} = [ $fsurl.'search/report_rt_transaction.html', '' ]; $report_rating{'Time worked summary per ticket'} = [ $fsurl.'search/report_rt_ticket.html', '' ]; @@ -316,7 +336,6 @@ tie my %report_ticketing, 'Tie::IxHash', ; tie my %report_bill_event, 'Tie::IxHash', - 'All billing events' => [ $fsurl.'search/report_cust_event.html', 'All billing events for a date range' ], 'Billing event errors' => [ $fsurl.'search/report_cust_event.html?failed=1', 'Failed credit cards, processor or printer problems, etc.' ], ; @@ -361,7 +380,8 @@ tie my %report_commissions, 'Tie::IxHash', 'Agent per package' => [ $fsurl.'search/report_agent_commission_pkg.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', '' ] + 'Employee' => [ $fsurl.'search/report_employee_commission.html', '' ], + 'Agent Credits and Payments' => [ $fsurl.'search/report_agent_credit_payment.html' ], ; tie my %report_financial, 'Tie::IxHash'; @@ -381,6 +401,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' ]; @@ -398,7 +420,7 @@ tie my %report_payable, 'Tie::IxHash', ; tie my %report_logs, 'Tie::IxHash'; -$report_logs{'Billing events'} = [ \%report_bill_event, 'Billing events' ] +$report_logs{'Billing events'} = [ $fsurl.'search/report_cust_event.html', 'Search billing events by date and status' ] 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'); @@ -412,6 +434,8 @@ $report_logs{'Outgoing messages'} = [ $fsurl.'search/cust_msg.html', 'View outgo || $curuser->access_right('Configuration'); tie my %report_menu, 'Tie::IxHash'; +$report_menu{'Saved searches'} = [ \%report_saved_searches, 'My saved searches' ] + if keys(%report_saved_searches); $report_menu{'Prospects'} = [ \%report_prospects, 'Prospect reports' ] if $curuser->access_right('List prospects') || $curuser->access_right('List contacts'); @@ -522,6 +546,8 @@ $tools_system{'Status'} = [ $fsurl.'view/Status.html', 'System status' ] if $curuser->access_right('Configuration'); # 'View system status'); $tools_system{'Job Queue'} = [ $fsurl.'search/queue.html', 'View pending job queue' ] if $curuser->access_right('Job queue'); +$tools_system{'Access log statistics'} = [ $fsurl.'search/report_access_user_log.html?group_by=path', '' ] + if $curuser->access_right('Configuration'); # 'View profiling data'); tie my %tools_menu, 'Tie::IxHash', (); $tools_menu{'Customers'} = [ \%tools_customers, 'Customer tools' ] @@ -592,6 +618,10 @@ tie my %config_circuit, 'Tie::IxHash', 'Termination types' => [ $fsurl.'browse/circuit_termination.html', '' ], ; +tie my %config_fiber, 'Tie::IxHash', + 'OLTs' => [ $fsurl.'browse/fiber_olt.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' ]; @@ -615,14 +645,14 @@ $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{'Fiber'} = [ \%config_fiber, '' ] + 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'); tie my %config_pkg_reason, 'Tie::IxHash', - 'Cancel reasons' => [ $fsurl.'browse/reason.html?class=C', 'Cancel reasons explain why a service was cancelled.' ], - 'Cancel reason types' => [ $fsurl.'browse/reason_type.html?class=C', 'Cancel reason types define groups of reasons.' ], - 'Suspend reasons' => [ $fsurl.'browse/reason.html?class=S', 'Suspend reasons explain why a service was suspended.' ], - 'Suspend reason types' => [ $fsurl.'browse/reason_type.html?class=S', 'Suspend reason types define groups of reasons.' ], + 'Cancel reasons' => [ $fsurl.'browse/reason_type.html?class=C', 'Cancel reasons explain why a service was cancelled.' ], + 'Suspend reasons' => [ $fsurl.'browse/reason_type.html?class=S', 'Suspend reasons explain why a service was suspended.' ], ; tie my %config_pkg, 'Tie::IxHash', (); @@ -654,13 +684,15 @@ tie my %config_cust, 'Tie::IxHash', 'Contact types' => [ $fsurl.'browse/contact_class.html', ''], #XXX useful description ; -$config_cust{'Note classes'} = [ $fsurl.'browse/cust_note_class.html', 'Note classes define groups of customer notes for reporting.' ] - if ($conf->exists('note-classes') && $conf->config('note-classes') > 0); +$config_cust{'Note classes'} = [ $fsurl.'browse/cust_note_class.html', 'Note classes define groups of customer notes for reporting.' ]; tie my %config_agent, 'Tie::IxHash', 'Agent types' => [ $fsurl.'browse/agent_type.cgi', 'Agent types define groups of package definitions that you can then assign to particular agents' ], 'Agents' => [ $fsurl.'browse/agent.cgi', 'Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their type)' ], - 'Agent payment gateways' => [ $fsurl.'browse/payment_gateway.html', 'Credit card and electronic check processors for agent overrides' ]; + 'Agent payment gateways' => [ $fsurl.'browse/payment_gateway.html', 'Credit card and electronic check processors for agent overrides' ], + 'separator' => '', + 'Commission schedules' => [ $fsurl.'browse/commission_schedule.html', + 'Commission schedules for consecutive billing periods' ], ; tie my %config_sales, 'Tie::IxHash', @@ -713,12 +745,13 @@ 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{'Credit reasons'} = [ $fsurl.'browse/reason_type.html?class=R', 'Credit reasons explain why a credit was issued.' ]; - $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.' ]; + $config_billing{'Refund reasons'} = [ $fsurl.'browse/reason_type.html?class=F', 'Refund reasons explain why a refund was issued.' ]; + + $config_billing{'Invoice void reasons'} = [ $fsurl.'browse/reason_type.html?class=I', 'Invoice void reasons explain why an invoice was voided.' ]; + $config_billing{'Payment void reasons'} = [ $fsurl.'browse/reason_type.html?class=P', 'Payment void reasons explain why a payment was voided.' ]; + $config_billing{'Credit void reasons'} = [ $fsurl.'browse/reason_type.html?class=X', 'Credit void reasons explain why a credit was voided.' ]; } #XXX also to be unified @@ -785,6 +818,10 @@ $config_misc{'Inventory classes and inventory'} = [ $fsurl.'browse/inventory_cla $config_misc{'Upload targets'} = [ $fsurl.'browse/upload_target.html', 'Billing and payment upload destinations' ] if $curuser->access_right('Configuration'); +$config_misc{'System log emails'} = [ $fsurl.'browse/log_email.html', 'Configure conditions for sending email when logging' ] + if $curuser->access_right('View system logs') + || $curuser->access_right('Configuration'); + tie my %config_menu, 'Tie::IxHash'; if ( $curuser->access_right('Configuration' ) ) { %config_menu = ( @@ -963,11 +1000,11 @@ sub submenu { my($subhtml, $submenuname ) = submenu($url_or_submenu, $_); #mmm, recursion "$subhtml\n". - "myMenu$menunum.add(new WebFXMenuItem(\"$_\", null, \"$tooltip\", $submenuname ));"; + "myMenu$menunum.add(new WebFXMenuItem(\"".mt($_)."\", null, \"".mt($tooltip)."\", $submenuname ));"; } else { - "myMenu$menunum.add(new WebFXMenuItem(\"$_\", \"$url_or_submenu\", \"$tooltip\" ));"; + "myMenu$menunum.add(new WebFXMenuItem(\"".mt($_)."\", \"$url_or_submenu\", \"".mt($tooltip)."\" ));"; }