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',
60 <% include( '/elements/tr-select-payby.html',
61 'payby_type' => 'cust',
68 <TD ALIGN="right">Payment expiration before</TD>
70 <SELECT NAME="paydate_month" DISABLED>
71 % foreach my $month ( 1 .. 12 ) {
72 <OPTION VALUE="<% $month %>"><% $month %></OPTION>
76 <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
77 <OPTION VALUE=""></OPTION>
78 % my $lastyear = (localtime(time))[5] + 1899;
79 % foreach my $year ( $lastyear .. $lastyear+12 ) {
80 <OPTION VALUE="<% $year %>"><% $year %></OPTION>
86 <SCRIPT TYPE="text/javascript">
87 function paydate_year_changed(what) {
88 var value = what.options[what.selectedIndex].value;
89 var month_select = what.form.paydate_month;
91 month_select.disabled = true;
93 month_select.disabled = false;
99 <TD ALIGN="right">Invoice terms</TD>
101 <% include( '/elements/select-terms.html',
102 'pre_options' => [ '' => 'all' ],
103 'empty_value' => 'NULL',
109 <% include( '/elements/tr-input-lessthan_greaterthan.html',
110 label => 'Current balance',
111 field => 'current_balance',
116 <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
117 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
121 <TD ALIGN="right" VALIGN="center">Without census tract</TD>
122 <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
125 % if ( $conf->exists('enable_taxproducts') ) {
128 <TD ALIGN="right" VALIGN="center">With hardcoded tax location</TD>
129 <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
135 <TH CLASS="background" COLSPAN=2> </TH>
139 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
141 <% include( '/elements/tr-select-cust-fields.html' ) %>
144 <TD ALIGN="right" VALIGN="center">Add package columns</TD>
145 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
150 <INPUT TYPE="submit" VALUE="Get Report">
154 <% include('/elements/footer.html') %>
158 unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
159 $FS::CurrentUser::CurrentUser->access_right('List packages')
162 my $conf = new FS::Conf;
168 'signupdate' => 'Signup date',