diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-08-09 15:19:32 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-08-09 15:19:32 -0700 |
commit | 96bfe632aeb28c7596bdfd5a7a98f0464f5ad6a5 (patch) | |
tree | 0fff7090118d8ada3eca08c11a5de7e25ff8f7e0 /httemplate/view/cust_main/packages | |
parent | 7de7c267ca9e04b1f057307ac03325c6d37228f2 (diff) |
optimizations for large package lists, RT#28526
Diffstat (limited to 'httemplate/view/cust_main/packages')
-rw-r--r-- | httemplate/view/cust_main/packages/package.html | 6 | ||||
-rwxr-xr-x | httemplate/view/cust_main/packages/section.html | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index bc619f8a8..99e40dfde 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -82,7 +82,9 @@ % if ( $curuser->access_right('Discount customer package') % && $part_pkg->can_discount % && ! scalar( @{ $cust_pkg->{_cust_pkg_discount_active} } ) -% && ! scalar($cust_pkg->part_pkg->part_pkg_discount) +% && ( ! $opt{'term_discounts'} +% || ! scalar($cust_pkg->part_pkg->part_pkg_discount) +% ) % ) % { % $br=1; @@ -100,7 +102,7 @@ % if ( ( $curuser->access_right('Billing event reports') % || $curuser->access_right('View customer billing events') % ) -% && $cust_pkg->num_cust_event +% && $cust_pkg->exists_cust_event % ) { ( <%pkg_event_link($cust_pkg)%> ) % } diff --git a/httemplate/view/cust_main/packages/section.html b/httemplate/view/cust_main/packages/section.html index 57ea378e0..11928ec64 100755 --- a/httemplate/view/cust_main/packages/section.html +++ b/httemplate/view/cust_main/packages/section.html @@ -11,8 +11,8 @@ % foreach my $cust_pkg (@$packages) { <& .packagerow, $cust_pkg, ( map { $_ => $opt{$_} } qw( - cust_main bgcolor - no_links before_pkg_callback before_svc_callback after_svc_callback + cust_main bgcolor no_links cust_location_cache + before_pkg_callback before_svc_callback after_svc_callback )), %conf_opt &> @@ -80,6 +80,7 @@ my %conf_opt = ( #for package.html 'invoice-unitprice' => $conf->exists('invoice-unitprice'), 'show_pkgnum' => $curuser->option('show_pkgnum'), + 'part_pkg-term_discounts' => $conf->exists('part_pkg-term_discounts'), #for services.html and status.html 'cust_pkg-display_times' => ($conf->exists('cust_pkg-display_times') |