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 BGCOLOR="#e8e8e8" 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)' ],
31 % foreach my $field (qw( signupdate )) {
34 <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
37 <% include( '/elements/tr-input-beginning_ending.html',
48 <% include( '/elements/tr-select-payby.html',
49 'payby_type' => 'cust',
56 <TD ALIGN="right">Payment expiration before</TD>
58 <SELECT NAME="paydate_month" DISABLED>
59 % foreach my $month ( 1 .. 12 ) {
60 <OPTION VALUE="<% $month %>"><% $month %></OPTION>
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>
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;
79 month_select.disabled = true;
81 month_select.disabled = false;
86 <% include( '/elements/tr-input-lessthan_greaterthan.html',
87 label => 'Current balance',
88 field => 'current_balance',
93 <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
94 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
97 % if ( $conf->exists('cust_main-require_censustract') ) {
100 <TD ALIGN="right" VALIGN="center">Without census tract</TD>
101 <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
107 <TH BGCOLOR="#e8e8e8" COLSPAN=2> </TH>
111 <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
113 <% include( '/elements/tr-select-cust-fields.html' ) %>
116 <TD ALIGN="right" VALIGN="center">Add package columns</TD>
117 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
122 <INPUT TYPE="submit" VALUE="Get Report">
126 <% include('/elements/footer.html') %>
130 unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
131 $FS::CurrentUser::CurrentUser->access_right('List packages')
134 my $conf = new FS::Conf;
140 'signupdate' => 'Signup date',