1 <& /elements/header.html, mt('Customer Report') &>
3 <FORM ACTION="cust_main.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="bill">
6 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
9 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Search options') |h %></FONT></TH>
12 <& /elements/tr-select-agent.html,
13 'curr_value' => scalar($cgi->param('agentnum')),
17 <& /elements/tr-select-sales.html,
18 'curr_value' => scalar($cgi->param('salesnum')),
19 'pre_options' => [ '' => 'all',
24 <& /elements/tr-select-cust_main-status.html,
25 'label' => emt('Status'),
28 <& /elements/tr-select-cust_class.html,
29 'label' => emt('Class'),
31 'pre_options' => [ '' => emt('(none)') ],
35 <& /elements/tr-select-part_referral.html,
36 'label' => emt('Advertising Source'),
38 #no, causes customers with disabled ones to disappear
43 <TD ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD>
44 <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
48 <TD ALIGN="right" VALIGN="center"><% mt('County') |h %></TD>
50 <& /elements/select-county.html,
52 empty_label => '(all)',
59 <TD ALIGN="right" VALIGN="center"><% mt('State') |h %></TD>
61 <& /elements/select-state.html,
63 empty_label => '(all)',
69 <TD ALIGN="right" VALIGN="center"><% mt('Zip') |h %></TD>
70 <TD><INPUT TYPE="text" NAME="zip" SIZE=12></TD>
74 <TD ALIGN="right" VALIGN="center"><% mt('Country') |h %></TD>
76 <& /elements/select-country.html,
78 state_disable_empty => 0,
79 state_empty_label => '(all)',
85 <TD ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TD>
88 <& /elements/tr-input-beginning_ending.html,
89 prefix => 'signupdate',
96 % if ( $conf->exists('cust_main-enable_birthdate') ) {
98 <TD ALIGN="right" VALIGN="center"><% mt('Date of Birth') |h %></TD>
101 <& /elements/tr-input-beginning_ending.html,
102 prefix => 'birthdate',
110 % if ( $conf->exists('cust_main-enable_spouse_birthdate') ) {
112 <TD ALIGN="right" VALIGN="center"><% mt('Spouse Date of Birth') |h %></TD>
115 <& /elements/tr-input-beginning_ending.html,
116 prefix => 'spouse_birthdate',
124 % if ( $conf->exists('cust_main-enable_anniversary_date') ) {
126 <TD ALIGN="right" VALIGN="center"><% mt('Anniversary Date') |h %></TD>
129 <& /elements/tr-input-beginning_ending.html,
130 prefix => 'anniversary_date',
139 <TD ALIGN="right">Tags</TD>
141 <& /elements/select-cust_tag.html,
146 <DIV STYLE="display:inline-block; vertical-align:baseline">
147 <INPUT TYPE="radio" NAME="all_tags" VALUE="0" CHECKED> Any of these
149 <INPUT TYPE="radio" NAME="all_tags" VALUE="1"> All of these
155 <TD ALIGN="right">With package of class</TD>
157 <& /elements/select-pkg_class.html,
158 'field' => 'pkg_classnum',
161 <DIV STYLE="display:inline-block; vertical-align:baseline">
162 <INPUT TYPE="radio" NAME="all_pkg_classnums" VALUE="0" CHECKED>
165 <INPUT TYPE="radio" NAME="all_pkg_classnums" VALUE="1">
171 <& /elements/tr-select-payby.html,
172 'payby_type' => 'cust',
178 <TD ALIGN="right"><% mt('Payment expiration before') |h %></TD>
180 <SELECT NAME="paydate_month" DISABLED>
181 % foreach my $month ( 1 .. 12 ) {
182 <OPTION VALUE="<% $month %>"><% $month %></OPTION>
186 <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
187 <OPTION VALUE=""></OPTION>
188 % my $lastyear = (localtime(time))[5] + 1899;
189 % foreach my $year ( $lastyear .. $lastyear+12 ) {
190 <OPTION VALUE="<% $year %>"><% $year %></OPTION>
196 <SCRIPT TYPE="text/javascript">
197 function paydate_year_changed(what) {
198 var value = what.options[what.selectedIndex].value;
199 var month_select = what.form.paydate_month;
201 month_select.disabled = true;
203 month_select.disabled = false;
209 <TD ALIGN="right"><% mt('Invoice terms') |h %></TD>
211 <& /elements/select-terms.html,
212 'pre_options' => [ '' => emt('all') ],
213 'empty_value' => 'NULL',
218 <& /elements/tr-input-lessthan_greaterthan.html,
219 label => emt('Current balance'),
220 field => 'current_balance',
224 <TD ALIGN="right" VALIGN="center"><% mt('With email address(es)') |h %></TD>
225 <TD><INPUT TYPE="checkbox" NAME="with_email"></TD>
229 <TD ALIGN="right" VALIGN="center"><% mt('With postal mail invoices') |h %></TD>
230 <TD><INPUT TYPE="checkbox" NAME="POST" ID="POST" onClick="POST_changed();"></TD>
234 <TD ALIGN="right" VALIGN="center"><% mt('Without postal mail invoices') |h %></TD>
235 <TD><INPUT TYPE="checkbox" NAME="no_POST" ID="no_POST" onClick="no_POST_changed();"></TD>
238 <SCRIPT TYPE="text/javascript">
239 function POST_changed() {
240 if ( document.getElementById('POST').checked == true ) {
241 document.getElementById('no_POST').checked = false;
244 function no_POST_changed() {
245 if ( document.getElementById('no_POST').checked == true ) {
246 document.getElementById('POST').checked = false;
252 <TH CLASS="background" COLSPAN=2> </TH>
256 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
258 <& /elements/tr-select-cust-fields.html &>
261 <TD ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TD>
262 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
266 <TD ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TD>
267 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
273 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
277 <& /elements/footer.html &>
281 unless $FS::CurrentUser::CurrentUser->access_right('Advanced customer search');
283 my $conf = new FS::Conf;