remove invoice deletion (and ancient & unused config settings), RT#37157
[freeside.git] / httemplate / view / cust_main / payment_history / invoice.html
1 <% $link %><% $invoice %><% $link ? '</A>' : '' %><% "$void$under" %>
2 <%init>
3
4 my( $cust_bill, %opt ) = @_;
5
6 my $invoice = emt("Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed);
7
8 my $under = '';
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) .
12     '</FONT></B>';
13   if ( $cust_bill->promised_date ) {
14     $under .= '<BR>'. emt('Payment promised on [_1]',
15         time2str($opt{'date_format'}, $cust_bill->promised_date));
16   }
17 } #if $cust_bill->owed
18
19 my $invnum = $cust_bill->invnum;
20
21 my $link = $opt{'View invoices'}
22              ? qq!<A HREF="${p}view/cust_bill.cgi?$invnum">!
23              : '';
24
25 my $void = '';
26 if ( $cust_bill->closed !~ /^Y/i && $opt{'Void invoices'} ) {
27   $void =
28     ' ('. include('/elements/popup_link.html',
29                     'label'     => emt('void'),
30                     'action'    => "${p}misc/void-cust_bill.html?;invnum=".
31                                     $cust_bill->invnum,
32                     'actionlabel' => emt('Void Invoice'),
33                  ).
34      ')';
35 }
36
37 my $events = '';
38 if ( $cust_bill->num_cust_event
39      && ($opt{'Billing event reports'} || $opt{'View customer billing events'})
40    )
41 {
42   $under .=
43     qq!<BR><A HREF="${p}search/cust_event.html?invnum=$invnum">( !.
44       emt('View invoice events').' )</A>';
45 }
46 $under = '<FONT SIZE="-1">'.$under.'</FONT>' if length($under);
47
48 </%init>