FCC form 477 reporting #4912
[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
12     <% include( '/elements/tr-select-agent.html',
13                   'curr_value'    => scalar($cgi->param('agentnum')),
14                   'disable_empty' => 0,
15                )
16     %>
17
18     <% include( '/elements/tr-select-cust_main-status.html',
19                   'label' => 'Status'
20               )
21     %>
22
23
24 %   foreach my $field (qw( signupdate )) {
25
26       <TR>
27         <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
28         <TD>
29           <TABLE>
30             <% include( '/elements/tr-input-beginning_ending.html',
31                           prefix   => $field,
32                           layout   => 'horiz',
33                       )
34             %>
35           </TABLE>
36         </TD>
37       </TR>
38
39 %   }
40
41     <% include( '/elements/tr-select-payby.html',
42                   'payby_type' => 'cust',
43                   'multiple'   => 1,
44                   'curr_value' => { map { $_ => 1 } FS::payby->cust_payby },
45               )
46     %>
47     
48     <% include( '/elements/tr-input-lessthan_greaterthan.html',
49                   label   => 'Current balance',
50                   field   => 'current_balance',
51               )
52     %>
53
54     <TR>
55       <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
56         <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
57     </TR>
58
59 %   if ( $conf->exists('cust_main-require_censustract') ) {
60
61     <TR>
62       <TD ALIGN="right" VALIGN="center">Without census tract</TD>
63         <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
64     </TR>
65
66 %   }
67
68     <TR>
69       <TH BGCOLOR="#e8e8e8" COLSPAN=2>&nbsp;</TH>
70     </TR>
71
72     <TR>
73       <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
74     </TR>
75     <% include( '/elements/tr-select-cust-fields.html' ) %>
76
77     <TR>
78       <TD ALIGN="right" VALIGN="center">Add package columns</TD>
79         <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
80     </TR>
81   </TABLE>
82
83 <BR>
84 <INPUT TYPE="submit" VALUE="Get Report">
85
86 </FORM>
87
88 <% include('/elements/footer.html') %>
89 <%init>
90
91 die "access denied"
92   unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
93            $FS::CurrentUser::CurrentUser->access_right('List packages')
94          );;
95
96 my $conf = new FS::Conf;
97
98 </%init>
99 <%once>
100
101 my %label = (
102   'signupdate'     => 'Signup date',
103 );
104
105 </%once>