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-cust_main-status.html,
18 'label' => emt('Status'),
21 <& /elements/tr-select-cust_class.html,
22 'label' => emt('Class'),
24 'pre_options' => [ '' => emt('(none)') ],
28 <& /elements/tr-select-part_referral.html,
29 'label' => emt('Advertising Source'),
31 #no, causes customers with disabled ones to disappear
36 <TD ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD>
37 <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
41 <TD ALIGN="right" VALIGN="center"><% mt('Zip') |h %></TD>
42 <TD><INPUT TYPE="text" NAME="zip" SIZE=12></TD>
46 <TD ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TD>
49 <& /elements/tr-input-beginning_ending.html,
50 prefix => 'signupdate',
57 % if ( $conf->exists('cust_main-enable_birthdate') ) {
59 <TD ALIGN="right" VALIGN="center"><% mt('Date of Birth') |h %></TD>
62 <& /elements/tr-input-beginning_ending.html,
63 prefix => 'birthdate',
71 % if ( $conf->exists('cust_main-enable_spouse_birthdate') ) {
73 <TD ALIGN="right" VALIGN="center"><% mt('Spouse Date of Birth') |h %></TD>
76 <& /elements/tr-input-beginning_ending.html,
77 prefix => 'spouse_birthdate',
85 % if ( $conf->exists('cust_main-enable_anniversary_date') ) {
87 <TD ALIGN="right" VALIGN="center"><% mt('Anniversary Date') |h %></TD>
90 <& /elements/tr-input-beginning_ending.html,
91 prefix => 'anniversary_date',
100 <TD ALIGN="right">Tags</TD>
102 <& /elements/select-cust_tag.html,
107 <DIV STYLE="display:inline-block; vertical-align:baseline">
108 <INPUT TYPE="radio" NAME="all_tags" VALUE="0" CHECKED> Any of these
110 <INPUT TYPE="radio" NAME="all_tags" VALUE="1"> All of these
115 <& /elements/tr-select-payby.html,
116 'payby_type' => 'cust',
122 <TD ALIGN="right"><% mt('Payment expiration before') |h %></TD>
124 <SELECT NAME="paydate_month" DISABLED>
125 % foreach my $month ( 1 .. 12 ) {
126 <OPTION VALUE="<% $month %>"><% $month %></OPTION>
130 <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
131 <OPTION VALUE=""></OPTION>
132 % my $lastyear = (localtime(time))[5] + 1899;
133 % foreach my $year ( $lastyear .. $lastyear+12 ) {
134 <OPTION VALUE="<% $year %>"><% $year %></OPTION>
140 <SCRIPT TYPE="text/javascript">
141 function paydate_year_changed(what) {
142 var value = what.options[what.selectedIndex].value;
143 var month_select = what.form.paydate_month;
145 month_select.disabled = true;
147 month_select.disabled = false;
153 <TD ALIGN="right"><% mt('Invoice terms') |h %></TD>
155 <& /elements/select-terms.html,
156 'pre_options' => [ '' => emt('all') ],
157 'empty_value' => 'NULL',
162 <& /elements/tr-input-lessthan_greaterthan.html,
163 label => emt('Current balance'),
164 field => 'current_balance',
168 <TD ALIGN="right" VALIGN="center"><% mt('Without census tract') |h %></TD>
169 <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
172 % if ( $conf->exists('enable_taxproducts') ) {
175 <TD ALIGN="right" VALIGN="center"><% mt('With hardcoded tax location') |h %></TD>
176 <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
182 <TD ALIGN="right" VALIGN="center"><% mt('With email address(es)') |h %></TD>
183 <TD><INPUT TYPE="checkbox" NAME="with_email"></TD>
187 <TD ALIGN="right" VALIGN="center"><% mt('With postal mail invoices') |h %></TD>
188 <TD><INPUT TYPE="checkbox" NAME="POST" ID="POST" onClick="POST_changed();"></TD>
192 <TD ALIGN="right" VALIGN="center"><% mt('Without postal mail invoices') |h %></TD>
193 <TD><INPUT TYPE="checkbox" NAME="no_POST" ID="no_POST" onClick="no_POST_changed();"></TD>
196 <SCRIPT TYPE="text/javascript">
197 function POST_changed() {
198 if ( document.getElementById('POST').checked == true ) {
199 document.getElementById('no_POST').checked = false;
202 function no_POST_changed() {
203 if ( document.getElementById('no_POST').checked == true ) {
204 document.getElementById('POST').checked = false;
210 <TH CLASS="background" COLSPAN=2> </TH>
214 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
216 <& /elements/tr-select-cust-fields.html &>
219 <TD ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TD>
220 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
224 <TD ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TD>
225 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
231 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
235 <& /elements/footer.html &>
239 unless $FS::CurrentUser::CurrentUser->access_right('Advanced customer search');
241 my $conf = new FS::Conf;