UI nit: separate search & display options
[freeside.git] / httemplate / search / report_cust_main.html
1 <% include('/elements/header.html', 'Customer Report' ) %>
2
3 <FORM ACTION="cust_main.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="bill">
5
6   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
7
8     <TR>
9       <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
10     </TR>
11     <% include( '/elements/tr-select-agent.html',
12                    ($cgi->param('agentnum') || ''),
13                )
14     %>
15
16 %   foreach my $field (qw( signupdate )) {
17
18       <TR>
19         <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
20         <TD>
21           <TABLE>
22             <% include( '/elements/tr-input-beginning_ending.html',
23                           prefix   => $field,
24                           layout   => 'horiz',
25                       )
26             %>
27           </TABLE>
28         </TD>
29       </TR>
30
31 %   }
32
33     <% include( '/elements/tr-select-payby.html',
34                   'payby_type' => 'cust',
35                   'multiple'   => 1,
36                   'curr_value' => { map { $_ => 1 } FS::payby->cust_payby },
37               )
38     %>
39     
40     <% include( '/elements/tr-input-lessthan_greaterthan.html',
41                   label   => 'Current balance',
42                   field   => 'current_balance',
43               )
44     %>
45
46     <TR>
47       <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
48         <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
49     </TR>
50
51     <TR>
52       <TH BGCOLOR="#e8e8e8" COLSPAN=2>&nbsp;</TH>
53     </TR>
54
55     <TR>
56       <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
57     </TR>
58     <% include( '/elements/tr-select-cust-fields.html' ) %>
59
60     <TR>
61       <TD ALIGN="right" VALIGN="center">Add package columns</TD>
62         <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
63     </TR>
64   </TABLE>
65
66 <BR>
67 <INPUT TYPE="submit" VALUE="Get Report">
68
69 </FORM>
70
71 <% include('/elements/footer.html') %>
72 <%init>
73
74 die "access denied"
75   unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
76            $FS::CurrentUser::CurrentUser->access_right('List packages')
77          );;
78
79 </%init>
80 <%once>
81
82 my %label = (
83   'signupdate'     => 'Signup date',
84 );
85
86 </%once>