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('Basic 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('Signup date') |h %></TD>
46 <& /elements/tr-input-beginning_ending.html,
47 prefix => 'signupdate',
54 % if ( $conf->exists('cust_main-enable_birthdate') ) {
56 <TD ALIGN="right" VALIGN="center"><% mt('Date of Birth') |h %></TD>
59 <& /elements/tr-input-beginning_ending.html,
60 prefix => 'birthdate',
68 % if ( $conf->exists('cust_main-enable_spouse_birthdate') ) {
70 <TD ALIGN="right" VALIGN="center"><% mt('Spouse Date of Birth') |h %></TD>
73 <& /elements/tr-input-beginning_ending.html,
74 prefix => 'spouse_birthdate',
82 % if ( $conf->exists('cust_main-enable_anniversary_date') ) {
84 <TD ALIGN="right" VALIGN="center"><% mt('Anniversary Date') |h %></TD>
87 <& /elements/tr-input-beginning_ending.html,
88 prefix => 'anniversary_date',
97 <TD ALIGN="right">Tags</TD>
99 <& /elements/select-cust_tag.html,
104 <DIV STYLE="display:inline-block; vertical-align:baseline">
105 <INPUT TYPE="radio" NAME="all_tags" VALUE="0" CHECKED> Any of these
107 <INPUT TYPE="radio" NAME="all_tags" VALUE="1"> All of these
113 <TD ALIGN="right">With package of class</TD>
115 <& /elements/select-pkg_class.html,
116 'field' => 'pkg_classnum',
119 <DIV STYLE="display:inline-block; vertical-align:baseline">
120 <INPUT TYPE="radio" NAME="all_pkg_classnums" VALUE="0" CHECKED>
123 <INPUT TYPE="radio" NAME="all_pkg_classnums" VALUE="1">
130 <TH CLASS="background" COLSPAN=2> </TH>
134 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Location search options') |h %></FONT></TH>
138 <TD ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD>
139 <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
143 <TD ALIGN="right" VALIGN="center"><% mt('City') |h %></TD>
145 <& /elements/city.html,
147 empty_label => '(all)',
154 <TD ALIGN="right" VALIGN="center"><% mt('County') |h %></TD>
156 <& /elements/select-county.html,
158 empty_label => '(all)',
164 <TD ALIGN="right" VALIGN="center"><% mt('State') |h %></TD>
166 <& /elements/select-state.html,
168 empty_label => '(all)',
174 <TD ALIGN="right" VALIGN="center"><% mt('Zip') |h %></TD>
175 <TD><INPUT TYPE="text" NAME="zip" SIZE=12></TD>
179 <TD ALIGN="right" VALIGN="center"><% mt('Country') |h %></TD>
181 <& /elements/select-country.html,
183 state_disable_empty => 0,
184 state_empty_label => '(all)',
190 <TH CLASS="background" COLSPAN=2> </TH>
194 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Billing search options') |h %></FONT></TH>
197 % my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups');
198 % unless ( @exempt_groups ) {
200 % #falze laziness with With/Without postal mail invoices
202 <TD ALIGN="right" VALIGN="center"><% mt('Tax exempt') |h %></TD>
203 <TD><INPUT TYPE="checkbox" NAME="tax" ID="tax" onClick="tax_changed();"></TD>
207 <TD ALIGN="right" VALIGN="center"><% mt('Not tax exempt') |h %></TD>
208 <TD><INPUT TYPE="checkbox" NAME="no_tax" ID="no_tax" onClick="no_tax_changed();"></TD>
211 <SCRIPT TYPE="text/javascript">
212 function tax_changed() {
213 if ( document.getElementById('tax').checked == true ) {
214 document.getElementById('no_tax').checked = false;
217 function no_tax_changed() {
218 if ( document.getElementById('no_tax').checked == true ) {
219 document.getElementById('tax').checked = false;
226 <TD ALIGN="right"><% mt('Invoice terms') |h %></TD>
228 % my @agentnums = $FS::CurrentUser::CurrentUser->agentnums;
229 % my $agentnum = scalar(@agentnums) == 1 ? $agentnums[0] : '';
230 <& /elements/select-terms.html,
231 'pre_options' => [ '' => emt('all') ],
232 'empty_value' => 'NULL',
233 'agentnum' => $agentnum,
238 <& /elements/tr-input-lessthan_greaterthan.html,
239 label => emt('Current balance'),
240 field => 'current_balance',
244 <TD ALIGN="right" VALIGN="center"><% mt('With invoicing email address(es)') |h %></TD>
245 <TD><INPUT TYPE="checkbox" NAME="with_email"></TD>
249 <TD ALIGN="right" VALIGN="center"><% mt('With postal mail invoices') |h %></TD>
250 <TD><INPUT TYPE="checkbox" NAME="POST" ID="POST" onClick="POST_changed();"></TD>
254 <TD ALIGN="right" VALIGN="center"><% mt('Without postal mail invoices') |h %></TD>
255 <TD><INPUT TYPE="checkbox" NAME="no_POST" ID="no_POST" onClick="no_POST_changed();"></TD>
258 <SCRIPT TYPE="text/javascript">
259 function POST_changed() {
260 if ( document.getElementById('POST').checked == true ) {
261 document.getElementById('no_POST').checked = false;
264 function no_POST_changed() {
265 if ( document.getElementById('no_POST').checked == true ) {
266 document.getElementById('POST').checked = false;
272 <TH CLASS="background" COLSPAN=2> </TH>
276 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
278 <& /elements/tr-select-cust-fields.html &>
281 <TD ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TD>
282 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
286 <TD ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TD>
287 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
293 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
297 <& /elements/footer.html &>
301 unless $FS::CurrentUser::CurrentUser->access_right('Advanced customer search');
303 my $conf = new FS::Conf;