summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/payment_history/voided_invoice.html
blob: ea61f8446b1f0ddb40ef74a4de4a4f4d6cd740e8 (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
<DEL><% $link %><% $invoice %><% $link ? '</A>' : '' %></DEL>
<I>voided 
% my $void_user = $cust_bill_void->void_access_user;
% if ($void_user) {
    by <% $void_user->username %>
% }
% my $reason = $cust_bill_void->reason;
% if ($reason) {
     (<% $reason %>)
% }
<% mt("on [_1]", time2str($date_format, $cust_bill_void->void_date) ) |h %> 
</I>
<% "$unvoid$under" %>
<%init>

my( $cust_bill_void, %opt ) = @_;

my $date_format = $opt{'date_format'} || '%m/%d/%Y';

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 = $opt{'View invoices'}
             ? qq!<A HREF="${p}view/cust_bill_void.html?$invnum">!
             : '';

my $unvoid = '';
$unvoid = areyousure_link("${p}misc/unvoid-cust_bill_void.html?invnum=". $cust_bill_void->invnum,
                            emt('Are you sure you want to unvoid this invoice?'),
                            emt('Unvoid this invoice'),
                            emt('unvoid')
                         )
  if $cust_bill_void->closed !~ /^Y/ && $opt{'Unvoid invoices'};

my $events = '';
if ( $cust_bill_void->num_cust_event
     && ($opt{'Billing event reports'} || $opt{'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>