1 <% include('/elements/header.html', '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">Search options</FONT></TH>
12 <% include( '/elements/tr-select-agent.html',
13 'curr_value' => scalar($cgi->param('agentnum')),
18 <% include( '/elements/tr-select-cust_main-status.html',
23 <% include( '/elements/tr-select-cust_class.html',
26 'pre_options' => [ '' => '(none)' ],
32 <TD ALIGN="right" VALIGN="center">Address</TD>
33 <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
36 % foreach my $field (qw( signupdate )) {
39 <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
42 <% include( '/elements/tr-input-beginning_ending.html',
53 <% include( '/elements/tr-select-cust_tag.html',
61 <% include( '/elements/tr-select-payby.html',
62 'payby_type' => 'cust',
69 <TD ALIGN="right">Payment expiration before</TD>
71 <SELECT NAME="paydate_month" DISABLED>
72 % foreach my $month ( 1 .. 12 ) {
73 <OPTION VALUE="<% $month %>"><% $month %></OPTION>
77 <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
78 <OPTION VALUE=""></OPTION>
79 % my $lastyear = (localtime(time))[5] + 1899;
80 % foreach my $year ( $lastyear .. $lastyear+12 ) {
81 <OPTION VALUE="<% $year %>"><% $year %></OPTION>
87 <SCRIPT TYPE="text/javascript">
88 function paydate_year_changed(what) {
89 var value = what.options[what.selectedIndex].value;
90 var month_select = what.form.paydate_month;
92 month_select.disabled = true;
94 month_select.disabled = false;
100 <TD ALIGN="right">Invoice terms</TD>
102 <% include( '/elements/select-terms.html',
103 'pre_options' => [ '' => 'all' ],
104 'empty_value' => 'NULL',
110 <% include( '/elements/tr-input-lessthan_greaterthan.html',
111 label => 'Current balance',
112 field => 'current_balance',
117 <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
118 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
122 <TD ALIGN="right" VALIGN="center">Without census tract</TD>
123 <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
126 % if ( $conf->exists('enable_taxproducts') ) {
129 <TD ALIGN="right" VALIGN="center">With hardcoded tax location</TD>
130 <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
136 <TH CLASS="background" COLSPAN=2> </TH>
140 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
142 <% include( '/elements/tr-select-cust-fields.html' ) %>
145 <TD ALIGN="right" VALIGN="center">Add package columns</TD>
146 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
151 <INPUT TYPE="submit" VALUE="Get Report">
155 <% include('/elements/footer.html') %>
159 unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
160 $FS::CurrentUser::CurrentUser->access_right('List packages')
163 my $conf = new FS::Conf;
169 'signupdate' => 'Signup date',