optimizations for large package lists, RT#28526
[freeside.git] / httemplate / view / cust_main / packages / package.html
index 9f6169c..cf5c98a 100644 (file)
@@ -76,7 +76,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;
@@ -94,7 +96,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
 %              ) {
               (&nbsp;<%pkg_event_link($cust_pkg)%>&nbsp;)
 %           }