stray closing /TABLE in the no-ticket case
[freeside.git] / httemplate / search / report_cust_bill_void.html
1 <& /elements/header.html, mt($title, @title_arg) &>
2
3 <FORM ACTION="cust_bill_void.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
5 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
6
7 % unless ( $custnum ) {
8
9   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
10
11     <TR>
12       <TH CLASS="background" COLSPAN=2 ALIGN="left">
13         <FONT SIZE="+1">Customer search options</FONT>
14       </TH>
15     </TR>
16
17   <& /elements/tr-select-agent.html,
18                  'curr_value'    => scalar( $cgi->param('agentnum') ),
19                  'label'         => emt('Agent'),
20                  'disable_empty' => 0,
21   &>
22
23   <& /elements/tr-select-cust_class.html,
24       label         => mt('Customer Class'),
25       field         => 'cust_classnum',
26       multiple      => 1,
27      'pre_options'  => [ '0' => emt('(none)') ],
28      'all_selected' => 1,
29   &>
30
31   </TABLE>
32   <BR>
33
34 % }
35
36   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
37
38     <TR>
39       <TH CLASS="background" COLSPAN=2 ALIGN="left">
40         <FONT SIZE="+1">Invoice search options</FONT>
41       </TH>
42     </TR>
43
44   <& /elements/tr-input-beginning_ending.html &>
45
46   <& /elements/tr-input-lessthan_greaterthan.html,
47                 label   => emt('Charged'),
48                 field   => 'charged',
49   &>
50
51   <& /elements/tablebreak-tr-title.html,
52       value => 'Void circumstances'
53   &>
54   <& /elements/tr-select-user.html,
55       field => 'void_usernum',
56       label => 'Voided by: ',
57   &>
58   <& /elements/tr-input-beginning_ending.html, prefix => 'void_' &>
59
60   </TABLE>
61 <BR>
62 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
63
64 </FORM>
65
66 <& /elements/footer.html &>
67 <%init>
68
69 die "access denied"
70   unless $FS::CurrentUser::CurrentUser->access_right('List invoices');
71
72 my $conf = new FS::Conf;
73
74 my $title = 'Voided Invoice Report';
75 #false laziness w/report_cust_pkg.html
76 my @title_arg = ();
77
78 my $custnum = '';
79 my $cust_main = '';
80 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
81   $custnum = $1;
82   $cust_main = qsearchs({
83     'table'     => 'cust_main', 
84     'hashref'   => { 'custnum' => $custnum },
85     'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
86   }) or die "unknown custnum $custnum";
87   $title .= ': [_1]';
88   push @title_arg, $cust_main->name;
89 }
90
91 </%init>