1 <% $link %><% $pre %>Invoice #<% $cust_bill->display_invnum %>
2 (Balance $ <% $cust_bill->owed %>)<% $post %><% $link ? '</A>' : '' %><% $delete %><% $events %>
5 my( $cust_bill, %opt ) = @_;
7 my $conf = new FS::Conf;
9 my $curuser = $FS::CurrentUser::CurrentUser;
11 my($pre, $post) = ('', '');
12 if ( $cust_bill->owed > 0 ) {
13 $pre = '<B><FONT SIZE="+1" COLOR="#FF0000">Open ';
14 $post = '</FONT></B>';
17 my $invnum = $cust_bill->invnum;
19 my $link = $curuser->access_right('View invoices')
20 ? qq!<A HREF="${p}view/cust_bill.cgi?$invnum">!
24 if ( $opt{'deleteinvoices'} && $curuser->access_right('Delete invoices') ) {
25 $delete = qq! (<A HREF="javascript:areyousure('!.
26 qq!${p}misc/delete-cust_bill.html?$invnum',!.
27 qq!'Are you sure you want to delete this invoice?')"!.
28 qq! TITLE="Delete this invoice from the database completely"!.
34 if ( $cust_bill->num_cust_event
35 && ( $curuser->access_right('Billing event reports')
36 || $curuser->access_right('View customer billing events')
40 qq!<BR><FONT SIZE="-1"><A HREF="${p}search/cust_event.html?invnum=$invnum!.
41 '">( View invoice events )</A></FONT>';