fix table titles for new bg color
[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 CLASS="background" 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                   'all_selected' => 1,
52               )
53     %>
54
55     <TR>
56       <TD ALIGN="right">Payment expiration before</TD>
57       <TD>
58         <SELECT NAME="paydate_month" DISABLED>
59 %         foreach my $month ( 1 .. 12 ) {
60             <OPTION VALUE="<% $month %>"><% $month %></OPTION>
61 %         }
62         </SELECT>
63         /
64         <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
65           <OPTION VALUE=""></OPTION>
66 %         my $lastyear = (localtime(time))[5] + 1899;
67 %         foreach my $year ( $lastyear .. $lastyear+12 ) {
68             <OPTION VALUE="<% $year %>"><% $year %></OPTION>
69 %         }
70         </SELECT>
71       </TD>
72     </TR>
73
74     <SCRIPT TYPE="text/javascript">
75       function paydate_year_changed(what) {
76         var value = what.options[what.selectedIndex].value;
77         var month_select = what.form.paydate_month;
78         if ( value == '' ) {
79           month_select.disabled = true;
80         } else {
81           month_select.disabled = false;
82         }
83       }
84     </SCRIPT>
85  
86     <TR>
87       <TD ALIGN="right">Invoice terms</TD>
88       <TD>
89         <% include( '/elements/select-terms.html',
90                       'pre_options' => [ '' => 'all' ],
91                       'empty_value' => 'NULL',
92                   )
93         %>
94       </TD>
95     </TR>
96     
97     <% include( '/elements/tr-input-lessthan_greaterthan.html',
98                   label   => 'Current balance',
99                   field   => 'current_balance',
100               )
101     %>
102
103     <TR>
104       <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
105         <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
106     </TR>
107
108 %   if ( $conf->exists('cust_main-require_censustract') ) {
109
110     <TR>
111       <TD ALIGN="right" VALIGN="center">Without census tract</TD>
112         <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
113     </TR>
114
115 %   }
116
117     <TR>
118       <TH CLASS="background" COLSPAN=2>&nbsp;</TH>
119     </TR>
120
121     <TR>
122       <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
123     </TR>
124     <% include( '/elements/tr-select-cust-fields.html' ) %>
125
126     <TR>
127       <TD ALIGN="right" VALIGN="center">Add package columns</TD>
128         <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
129     </TR>
130   </TABLE>
131
132 <BR>
133 <INPUT TYPE="submit" VALUE="Get Report">
134
135 </FORM>
136
137 <% include('/elements/footer.html') %>
138 <%init>
139
140 die "access denied"
141   unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
142            $FS::CurrentUser::CurrentUser->access_right('List packages')
143          );
144
145 my $conf = new FS::Conf;
146
147 </%init>
148 <%once>
149
150 my %label = (
151   'signupdate'     => 'Signup date',
152 );
153
154 </%once>