+% my $events = '';
+% if ( $cust_bill->num_cust_event
+% && ( $curuser->access_right('Billing event reports')
+% || $curuser->access_right('View customer billing events')
+% )
+% ) {
+% $events =
+% qq!<BR><FONT SIZE="-1"><A HREF="${p}search/cust_event.html?invnum=!.
+% $cust_bill->invnum. '">( View invoice events )</A></FONT>';
+% }