X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fstatus.html;h=106137ba93482fb372b9f0854e64c93670ca0dea;hp=e0a188e5750b07ffef52b355bf1ab6937461bf09;hb=a30e8806a4d208aa8736061a3654b6ad97335322;hpb=3c34dbb2f2f79dbdf840c7df13862880640c82df diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html index e0a188e57..106137ba9 100644 --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@ -121,8 +121,11 @@ % } % % } -% my $autosuspend = pkg_autosuspend_time( $cust_pkg ); -% $cust_pkg->set('autosuspend', $autosuspend) if $autosuspend; +% +% if ( $conf->exists('cust_pkg-show_autosuspend') ) { +% my $autosuspend = pkg_autosuspend_time( $cust_pkg ); +% $cust_pkg->set('autosuspend', $autosuspend) if $autosuspend; +% } <% pkg_status_row_changed( $cust_pkg, %opt ) %> <% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %> @@ -167,6 +170,8 @@ my %opt = @_; +my $conf = new FS::Conf; + my $bgcolor = $opt{'bgcolor'}; my $cust_pkg = $opt{'cust_pkg'}; my $part_pkg = $opt{'part_pkg'}; @@ -352,7 +357,8 @@ sub pkg_autosuspend_time { my $days = 7; my $time = time; my $pending_suspend = 0; - #this seems to be extremely inefficient... + #this seems to be extremely inefficient... and is slowing down all customer + #views while ( $days > 0 && scalar( grep { $_->part_event->action eq 'suspend' }