1 <% $link %><% $invoice %><% $link ? '</A>' : '' %><% "$email$void$under" %>
4 my( $cust_bill, %opt ) = @_;
8 if ( $cust_bill->pending ) {
9 $invoice = '<I><FONT SIZE="+1" COLOR="#D05000">' .
10 emt("Pending Invoice #[_1] (Charges of [_2])", $cust_bill->display_invnum, $cust_bill->charged);
11 } elsif ( $cust_bill->owed > 0 ) {
12 $invoice = '<B><FONT SIZE="+1" COLOR="#FF0000">' .
13 emt("Open Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed) .
15 if ( $cust_bill->promised_date ) {
16 $under .= '<BR>'. emt('Payment promised on [_1]',
17 time2str($opt{'date_format'}, $cust_bill->promised_date));
20 $invoice = emt("Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed);
23 my $invnum = $cust_bill->invnum;
25 my $link = $opt{'View invoices'}
26 ? qq!<A HREF="${p}view/cust_bill.cgi?$invnum">!
30 if ( $cust_bill->closed !~ /^Y/i && $opt{'Void invoices'} ) {
32 ' ('. include('/elements/popup_link.html',
33 'label' => emt('void'),
34 'action' => "${p}misc/void-cust_bill.html?;invnum=".
36 'actionlabel' => emt('Void Invoice'),
41 my $email = ($opt{'has_email_address'} && $opt{'Resend invoices'}) ?
42 q! (<A HREF="javascript:void(0)" ONCLICK="areyousure_popup('Send email copy of invoice #!.
45 "${p}misc/send-invoice.cgi?method=email;notice_name=Invoice;popup=1;invnum=".
47 q!','Email Invoice Receipt')" TITLE="Send email invoice">email</A>)!
51 if ( $cust_bill->num_cust_event
52 && ($opt{'Billing event reports'} || $opt{'View customer billing events'})
56 qq!<BR><A HREF="${p}search/cust_event.html?invnum=$invnum">( !.
57 emt('View invoice events').' )</A>';
59 $under = '<FONT SIZE="-1">'.$under.'</FONT>' if length($under);