summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-02-09 22:39:43 -0800
committerIvan Kohler <ivan@freeside.biz>2016-02-09 22:39:43 -0800
commitf97797177af6a2456a8fed90372eca3f6d8f4049 (patch)
tree55ca0f205b84bdf109d821308a94ba6b64c5cb87 /httemplate
parent2b5ed545b9bbd4186bcc9bdf24515ee17394691f (diff)
optimize Reports->Customers->List Customers, RT#20173
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/search/cust_main.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index aabc0b98b..2e81a4a8c 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -237,7 +237,7 @@
% my $part_pkg = $_->part_pkg;
%
% my $pkg_comment = $part_pkg->pkg_comment( cust_pkg=>$_, 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;