blob: 7bf206352bc8cca3ef67a6a0e63ad0446b090330 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<DEL><% $link %><% $invoice %><% $link ? '</A>' : '' %></DEL>
<I><% mt("voided [_1]", time2str($date_format, $cust_bill_void->void_date) ) |h %>
% my $void_user = $cust_bill_void->void_access_user;
% if ($void_user) {
by <% $void_user->username %></I>
% }
<% "$unvoid$delete$under" %>
<%init>
my( $cust_bill_void, %opt ) = @_;
my $date_format = $opt{'date_format'} || '%m/%d/%Y';
my $conf = new FS::Conf;
my $curuser = $FS::CurrentUser::CurrentUser;
my $invoice = emt("Invoice #[_1] (Balance [_2])",$cust_bill_void->display_invnum, $cust_bill_void->charged);
my $under = '';
my $invnum = $cust_bill_void->invnum;
my $link = $curuser->access_right('View invoices')
? qq!<A HREF="${p}view/cust_bill_void.html?$invnum">!
: '';
my $unvoid = ''; #XXX unvoid
my $delete = '';
$delete = areyousure_link("${p}misc/delete-cust_bill.html?$invnum",
emt('Are you sure you want to delete this invoice?'),
emt('Delete this invoice from the database completely'),
emt('delete')
)
if ( $opt{'deleteinvoices'} && $curuser->access_right('Delete invoices') );
my $events = '';
#1.9
if ( $cust_bill_void->num_cust_event
&& ( $curuser->access_right('Billing event reports')
|| $curuser->access_right('View customer billing events')
)
) {
$under .=
qq!<BR><A HREF="${p}search/cust_event.html?invnum=$invnum">( !.
emt('View invoice events').' )</A>';
}
$under = '<FONT SIZE="-1">'.$under.'</FONT>' if length($under);
</%init>
|