1 <& /elements/header.html, mt('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"><% mt('Search options') |h %></FONT></TH>
12 <& /elements/tr-select-agent.html,
13 'curr_value' => scalar($cgi->param('agentnum')),
17 <& /elements/tr-select-cust_main-status.html,
18 'label' => emt('Status'),
21 <& /elements/tr-select-cust_class.html,
22 'label' => emt('Class'),
24 'pre_options' => [ '' => emt('(none)') ],
29 <TD ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD>
30 <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
34 <TD ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TD>
37 <& /elements/tr-input-beginning_ending.html,
38 prefix => 'signupdate',
45 % if ( $conf->exists('cust_main-enable_birthdate') ) {
47 <TD ALIGN="right" VALIGN="center"><% mt('Date of Birth') |h %></TD>
50 <& /elements/tr-input-beginning_ending.html,
51 prefix => 'birthdate',
59 % if ( $conf->exists('cust_main-enable_spouse_birthdate') ) {
61 <TD ALIGN="right" VALIGN="center"><% mt('Spouse Date of Birth') |h %></TD>
64 <& /elements/tr-input-beginning_ending.html,
65 prefix => 'spouse_birthdate',
73 <& /elements/tr-select-cust_tag.html,
79 <& /elements/tr-select-payby.html,
80 'payby_type' => 'cust',
86 <TD ALIGN="right"><% mt('Payment expiration before') |h %></TD>
88 <SELECT NAME="paydate_month" DISABLED>
89 % foreach my $month ( 1 .. 12 ) {
90 <OPTION VALUE="<% $month %>"><% $month %></OPTION>
94 <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
95 <OPTION VALUE=""></OPTION>
96 % my $lastyear = (localtime(time))[5] + 1899;
97 % foreach my $year ( $lastyear .. $lastyear+12 ) {
98 <OPTION VALUE="<% $year %>"><% $year %></OPTION>
104 <SCRIPT TYPE="text/javascript">
105 function paydate_year_changed(what) {
106 var value = what.options[what.selectedIndex].value;
107 var month_select = what.form.paydate_month;
109 month_select.disabled = true;
111 month_select.disabled = false;
117 <TD ALIGN="right"><% mt('Invoice terms') |h %></TD>
119 <& /elements/select-terms.html,
120 'pre_options' => [ '' => emt('all') ],
121 'empty_value' => 'NULL',
126 <& /elements/tr-input-lessthan_greaterthan.html,
127 label => emt('Current balance'),
128 field => 'current_balance',
132 <TD ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TD>
133 <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
137 <TD ALIGN="right" VALIGN="center"><% mt('Without census tract') |h %></TD>
138 <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
141 % if ( $conf->exists('enable_taxproducts') ) {
144 <TD ALIGN="right" VALIGN="center"><% mt('With hardcoded tax location') |h %></TD>
145 <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
151 <TH CLASS="background" COLSPAN=2> </TH>
155 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
157 <& /elements/tr-select-cust-fields.html &>
160 <TD ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TD>
161 <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
166 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
170 <& /elements/footer.html &>
174 unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
175 $FS::CurrentUser::CurrentUser->access_right('List packages')
178 my $conf = new FS::Conf;