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