optimize Reports->Customers->List Customers, RT#20173 FREESIDE_3_BRANCH_40236
authorIvan Kohler <ivan@freeside.biz>
Wed, 10 Feb 2016 06:40:50 +0000 (22:40 -0800)
committerIvan Kohler <ivan@freeside.biz>
Wed, 10 Feb 2016 06:40:50 +0000 (22:40 -0800)
FS/FS/access_user.pm
httemplate/search/cust_main.cgi

index 761f592..3bc2be3 100644 (file)
@@ -755,7 +755,6 @@ sub sched_item {
 sub locale {
   my $self = shift;
   return $self->{_locale} if exists($self->{_locale});
-warn "access_user->locale called\n";
   $self->{_locale} = $self->option('locale');
 }
 
index b70bb9a..aca2558 100755 (executable)
 %      my $part_pkg = $_->part_pkg;
 %
 %      my $pkg_comment = $part_pkg->pkg_comment(nopkgpart => 1);
-%      my $show = $curuser->default_customer_view =~ /^(jumbo|packages)$/
+%      my $show = $default_customer_view =~ /^(jumbo|packages)$/
 %                   ? ''
 %                   : ';show=packages';
 %      my $frag = "cust_pkg$pkgnum"; #hack for IE ignoring real #fragment
@@ -320,6 +320,8 @@ my $maxrecords = $conf->config('maxsearchrecordsperpage');
 # summarize more than this many services of the same svcpart
 my $large_pkg_size = $conf->config('cust_pkg-large_pkg_size') || 0;
 
+my $default_customer_view = $curuser->default_customer_view;
+
 my $limit = '';
 $limit .= "LIMIT $maxrecords" if $maxrecords;