1 <% $link %><% $invoice %><% $link ? '</A>' : '' %><% "$void$delete$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'),
38 $delete = areyousure_link("${p}misc/delete-cust_bill.html?$invnum",
39 emt('Are you sure you want to delete this invoice?'),
40 emt('Delete this invoice from the database completely'),
43 if ( $opt{'deleteinvoices'} && $opt{'Delete invoices'} );
46 if ( $cust_bill->num_cust_event
47 && ($opt{'Billing event reports'} || $opt{'View customer billing events'})
51 qq!<BR><A HREF="${p}search/cust_event.html?invnum=$invnum">( !.
52 emt('View invoice events').' )</A>';
54 $under = '<FONT SIZE="-1">'.$under.'</FONT>' if length($under);