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)' ],
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;
87 <TD ALIGN="right">Invoice terms</TD>
89 <% include( '/elements/select-terms.html',
90 'pre_options' => [ '' => 'all' ],
91 'empty_value' => 'NULL',
97 <% include( '/elements/tr-input-lessthan_greaterthan.html',
98 label => 'Current balance',
99 field => 'current_balance',
104 <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
105 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
108 % if ( $conf->exists('cust_main-require_censustract') ) {
111 <TD ALIGN="right" VALIGN="center">Without census tract</TD>
112 <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
118 <TH CLASS="background" COLSPAN=2> </TH>
122 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
124 <% include( '/elements/tr-select-cust-fields.html' ) %>
127 <TD ALIGN="right" VALIGN="center">Add package columns</TD>
128 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
133 <INPUT TYPE="submit" VALUE="Get Report">
137 <% include('/elements/footer.html') %>
141 unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
142 $FS::CurrentUser::CurrentUser->access_right('List packages')
145 my $conf = new FS::Conf;
151 'signupdate' => 'Signup date',