1 <% $link %><% $invoice %><% $link ? '</A>' : '' %><% "$email$void$under" %>
4 my( $cust_bill, %opt ) = @_;
6 my $invoice = emt("Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed);
9 if ( $cust_bill->owed > 0 ) {
10 $invoice = '<B><FONT SIZE="+1" COLOR="#FF0000">' .
11 emt("Open Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed) .
13 if ( $cust_bill->promised_date ) {
14 $under .= '<BR>'. emt('Payment promised on [_1]',
15 time2str($opt{'date_format'}, $cust_bill->promised_date));
17 } #if $cust_bill->owed
19 my $invnum = $cust_bill->invnum;
21 my $link = $opt{'View invoices'}
22 ? qq!<A HREF="${p}view/cust_bill.cgi?$invnum">!
26 if ( $cust_bill->closed !~ /^Y/i && $opt{'Void invoices'} ) {
28 ' ('. include('/elements/popup_link.html',
29 'label' => emt('void'),
30 'action' => "${p}misc/void-cust_bill.html?;invnum=".
32 'actionlabel' => emt('Void Invoice'),
37 my $email = ($opt{'has_email_address'} && $opt{'Resend invoices'}) ?
38 q! (<A HREF="javascript:void(0)" ONCLICK="areyousure_popup('Send email copy of invoice #!.
41 "${p}misc/send-invoice.cgi?method=email;notice_name=Invoice;popup=1;invnum=".
43 q!','Email Invoice Receipt')" TITLE="Send email invoice">email invoice</A>)!
47 if ( $cust_bill->num_cust_event
48 && ($opt{'Billing event reports'} || $opt{'View customer billing events'})
52 qq!<BR><A HREF="${p}search/cust_event.html?invnum=$invnum">( !.
53 emt('View invoice events').' )</A>';
55 $under = '<FONT SIZE="-1">'.$under.'</FONT>' if length($under);