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',
24 % foreach my $field (qw( signupdate )) {
27 <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
30 <% include( '/elements/tr-input-beginning_ending.html',
41 <% include( '/elements/tr-select-payby.html',
42 'payby_type' => 'cust',
49 <TD ALIGN="right">Payment expiration before</TD>
51 <SELECT NAME="paydate_month" DISABLED>
52 % foreach my $month ( 1 .. 12 ) {
53 <OPTION VALUE="<% $month %>"><% $month %></OPTION>
57 <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
58 <OPTION VALUE=""></OPTION>
59 % my $lastyear = (localtime(time))[5] + 1899;
60 % foreach my $year ( $lastyear .. $lastyear+12 ) {
61 <OPTION VALUE="<% $year %>"><% $year %></OPTION>
67 <SCRIPT TYPE="text/javascript">
68 function paydate_year_changed(what) {
69 var value = what.options[what.selectedIndex].value;
70 var month_select = what.form.paydate_month;
72 month_select.disabled = true;
74 month_select.disabled = false;
80 <TD ALIGN="right">Invoice terms</TD>
82 <% include( '/elements/select-terms.html',
83 'pre_options' => [ '' => 'all' ],
84 'empty_value' => 'NULL',
90 <% include( '/elements/tr-input-lessthan_greaterthan.html',
91 label => 'Current balance',
92 field => 'current_balance',
97 <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
98 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
101 % if ( $conf->exists('cust_main-require_censustract') ) {
104 <TD ALIGN="right" VALIGN="center">Without census tract</TD>
105 <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
111 <TH BGCOLOR="#e8e8e8" COLSPAN=2> </TH>
115 <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
117 <% include( '/elements/tr-select-cust-fields.html' ) %>
120 <TD ALIGN="right" VALIGN="center">Add package columns</TD>
121 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
126 <INPUT TYPE="submit" VALUE="Get Report">
130 <% include('/elements/footer.html') %>
134 unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
135 $FS::CurrentUser::CurrentUser->access_right('List packages')
138 my $conf = new FS::Conf;
144 'signupdate' => 'Signup date',