From: Ivan Kohler Date: Thu, 4 Dec 2014 18:37:16 +0000 (-0800) Subject: Merge branch 'master' of git.freeside.biz:/home/git/freeside X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=8dd41f364aaba88969dfd0908feb22709025e7f6;hp=-c Merge branch 'master' of git.freeside.biz:/home/git/freeside --- 8dd41f364aaba88969dfd0908feb22709025e7f6 diff --combined FS/FS/Template_Mixin.pm index 5af5b270b,2fae4643d..05972c0b7 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@@ -2153,9 -2153,9 +2153,9 @@@ sub _items_sections } else { $section->{'category'} = $sectionname; $section->{'description'} = &{ $escape }($sectionname); - if ( _pkg_category($_) ) { - $section->{'sort_weight'} = _pkg_category($_)->weight; - if ( _pkg_category($_)->condense ) { + if ( _pkg_category($sectionname) ) { + $section->{'sort_weight'} = _pkg_category($sectionname)->weight; + if ( _pkg_category($sectionname)->condense ) { $section = { %$section, $self->_condense_section($opt{format}) }; } } @@@ -2729,6 -2729,8 +2729,8 @@@ sub _items_cust_bill_pkg 'pkgnum' => $cust_bill_pkg->pkgpart, #so it displays in Ref 'description' => $description, 'amount' => sprintf("%.2f", $cust_bill_pkg->setup), + 'unit_amount' => sprintf("%.2f", $cust_bill_pkg->unitsetup), + 'quantity' => $cust_bill_pkg->quantity, 'preref_html' => ( $opt{preref_callback} ? &{ $opt{preref_callback} }( $cust_bill_pkg ) : '' @@@ -2740,6 -2742,12 +2742,12 @@@ 'pkgnum' => $cust_bill_pkg->pkgpart, #so it displays in Ref 'description' => "$desc (". $cust_bill_pkg->part_pkg->freq_pretty.")", 'amount' => sprintf("%.2f", $cust_bill_pkg->recur), + 'unit_amount' => sprintf("%.2f", $cust_bill_pkg->unitrecur), + 'quantity' => $cust_bill_pkg->quantity, + 'preref_html' => ( $opt{preref_callback} + ? &{ $opt{preref_callback} }( $cust_bill_pkg ) + : '' + ), }; } diff --combined httemplate/elements/menu.html index 3236bc14b,b4ecdc490..03ce20185 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@@ -89,16 -89,10 +89,16 @@@ my $curuser = $FS::CurrentUser::Current #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', '' ], @@@ -124,10 -118,6 +124,10 @@@ $report_customers{'Customer churn repor $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' ], @@@ -409,13 -399,11 +409,13 @@@ $report_logs{'Outgoing messages'} = [ $ 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' ] @@@ -564,6 -552,12 +564,12 @@@ tie my %config_conferencing, 'Tie::IxHa 'Quality levels' => [ $fsurl.'browse/conferencing_quality.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' ]; @@@ -584,6 -578,8 +590,8 @@@ $config_export_svc{'Conferencing'} = [ 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'); diff --combined httemplate/misc/cancel_cust.html index ebf111935,e4bfdba76..85367026c --- a/httemplate/misc/cancel_cust.html +++ b/httemplate/misc/cancel_cust.html @@@ -7,7 -7,8 +7,7 @@@

<% mt('Permanently delete all services and cancel this customer?') |h %> - +
@@@ -43,12 -44,13 +43,12 @@@ toggle(false) <% mt($ban) |h %> % } - +
<& /elements/tr-select-reason.html, 'field' => 'reasonnum', 'reason_class' => 'C', 'cgi' => $cgi, - 'control_button' => "document.getElementById('confirm_cancel_cust_button')", + 'control_button' => 'confirm_cancel_cust_button', &>
diff --combined httemplate/misc/suspend_cust.html index 8eedd0a57,3a49e136d..83d974300 --- a/httemplate/misc/suspend_cust.html +++ b/httemplate/misc/suspend_cust.html @@@ -7,7 -7,8 +7,7 @@@

<% mt('Suspend this customer?') |h %> - +
@@@ -35,12 -36,13 +35,12 @@@ function toggle(val) toggle(false); - +
<& /elements/tr-select-reason.html, 'field' => 'reasonnum', 'reason_class' => 'S', 'cgi' => $cgi, - 'control_button' => "document.getElementById('confirm_suspend_cust_button')", + 'control_button' => 'confirm_suspend_cust_button', &>