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-payby.html',
54 'payby_type' => 'cust',
61 <TD ALIGN="right">Payment expiration before</TD>
63 <SELECT NAME="paydate_month" DISABLED>
64 % foreach my $month ( 1 .. 12 ) {
65 <OPTION VALUE="<% $month %>"><% $month %></OPTION>
69 <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
70 <OPTION VALUE=""></OPTION>
71 % my $lastyear = (localtime(time))[5] + 1899;
72 % foreach my $year ( $lastyear .. $lastyear+12 ) {
73 <OPTION VALUE="<% $year %>"><% $year %></OPTION>
79 <SCRIPT TYPE="text/javascript">
80 function paydate_year_changed(what) {
81 var value = what.options[what.selectedIndex].value;
82 var month_select = what.form.paydate_month;
84 month_select.disabled = true;
86 month_select.disabled = false;
92 <TD ALIGN="right">Invoice terms</TD>
94 <% include( '/elements/select-terms.html',
95 'pre_options' => [ '' => 'all' ],
96 'empty_value' => 'NULL',
102 <% include( '/elements/tr-input-lessthan_greaterthan.html',
103 label => 'Current balance',
104 field => 'current_balance',
109 <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
110 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
114 <TD ALIGN="right" VALIGN="center">Without census tract</TD>
115 <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
118 % if ( $conf->exists('enable_taxproducts') ) {
121 <TD ALIGN="right" VALIGN="center">With hardcoded tax location</TD>
122 <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
128 <TH CLASS="background" COLSPAN=2> </TH>
132 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
134 <% include( '/elements/tr-select-cust-fields.html' ) %>
137 <TD ALIGN="right" VALIGN="center">Add package columns</TD>
138 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
143 <INPUT TYPE="submit" VALUE="Get Report">
147 <% include('/elements/footer.html') %>
151 unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
152 $FS::CurrentUser::CurrentUser->access_right('List packages')
155 my $conf = new FS::Conf;
161 'signupdate' => 'Signup date',