1 <DEL><% $link %><% $invoice %><% $link ? '</A>' : '' %></DEL>
2 <I><% mt("voided [_1]", time2str($date_format, $cust_bill_void->void_date) ) |h %>
3 % my $void_user = $cust_bill_void->void_access_user;
5 by <% $void_user->username %></I>
7 <% "$unvoid$delete$under" %>
10 my( $cust_bill_void, %opt ) = @_;
12 my $date_format = $opt{'date_format'} || '%m/%d/%Y';
14 my $conf = new FS::Conf;
16 my $curuser = $FS::CurrentUser::CurrentUser;
18 my $invoice = emt("Invoice #[_1] (Balance [_2])",$cust_bill_void->display_invnum, $cust_bill_void->charged);
22 my $invnum = $cust_bill_void->invnum;
24 my $link = $curuser->access_right('View invoices')
25 ? qq!<A HREF="${p}view/cust_bill_void.html?$invnum">!
29 $unvoid = areyousure_link("${p}misc/unvoid-cust_bill_void.html?invnum=". $cust_bill_void->invnum,
30 emt('Are you sure you want to unvoid this invoice?'),
31 emt('Unvoid this invoice'),
34 if $cust_bill_void->closed !~ /^Y/ && $curuser->access_right('Unvoid invoices');
37 $delete = areyousure_link("${p}misc/delete-cust_bill.html?$invnum",
38 emt('Are you sure you want to delete this invoice?'),
39 emt('Delete this invoice from the database completely'),
42 if ( $opt{'deleteinvoices'} && $curuser->access_right('Delete invoices') );
46 if ( $cust_bill_void->num_cust_event
47 && ( $curuser->access_right('Billing event reports')
48 || $curuser->access_right('View customer billing events')
52 qq!<BR><A HREF="${p}search/cust_event.html?invnum=$invnum">( !.
53 emt('View invoice events').' )</A>';
55 $under = '<FONT SIZE="-1">'.$under.'</FONT>' if length($under);