internationalization/localization, RT12515
[freeside.git] / httemplate / view / cust_main / payment_history / invoice.html
1 <% $link %><% $invoice %><% $link ? '</A>' : '' %><% $delete %><% $events %>
2 <%init>
3
4 my( $cust_bill, %opt ) = @_;
5
6 my $conf = new FS::Conf;
7
8 my $curuser = $FS::CurrentUser::CurrentUser;
9
10 my $invoice = mt("Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed);
11 $invoice = '<B><FONT SIZE="+1" COLOR="#FF0000">' .
12     mt("Open Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed) .
13     '</FONT></B>'
14 if ( $cust_bill->owed > 0 );
15
16 my $invnum = $cust_bill->invnum;
17
18 my $link = $curuser->access_right('View invoices')
19              ? qq!<A HREF="${p}view/cust_bill.cgi?$invnum">!
20              : '';
21
22 my $delete = '';
23 if ( $opt{'deleteinvoices'} && $curuser->access_right('Delete invoices') ) {
24   $delete = qq! (<A HREF="javascript:areyousure('!.
25             qq!${p}misc/delete-cust_bill.html?$invnum',!.
26             qq!'Are you sure you want to delete this invoice?')"!.
27             qq! TITLE="Delete this invoice from the database completely"!.
28             mt('delete') . '</A>)';
29 }
30
31 my $events = '';
32 #1.9
33 if ( $cust_bill->num_cust_event
34      && (    $curuser->access_right('Billing event reports')
35           || $curuser->access_right('View customer billing events')
36         )
37    ) {
38   $events =
39     qq!<BR><FONT SIZE="-1"><A HREF="${p}search/cust_event.html?invnum=$invnum!.
40     '">( '.mt('View invoice events').' )</A></FONT>';
41 }
42 #
43
44 </%init>