add search on harcoded geocode customers w/cch, RT#10376
[freeside.git] / httemplate / search / report_cust_main.html
1 <% include('/elements/header.html', 'Customer Report' ) %>
2
3 <FORM ACTION="cust_main.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="bill">
5
6   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
7
8     <TR>
9       <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
10     </TR>
11
12     <% include( '/elements/tr-select-agent.html',
13                   'curr_value'    => scalar($cgi->param('agentnum')),
14                   'disable_empty' => 0,
15                )
16     %>
17
18     <% include( '/elements/tr-select-cust_main-status.html',
19                   'label' => 'Status'
20               )
21     %>
22
23     <% include( '/elements/tr-select-cust_class.html',
24                   'label'        => 'Class',
25                   'multiple'     => 1,
26                   'pre_options'  => [ '' => '(none)' ],
27                   'all_selected' => 1,
28               )
29     %>
30
31     <TR>
32       <TD ALIGN="right" VALIGN="center">Address</TD>
33       <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
34     </TR>
35
36 %   foreach my $field (qw( signupdate )) {
37
38       <TR>
39         <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
40         <TD>
41           <TABLE>
42             <% include( '/elements/tr-input-beginning_ending.html',
43                           prefix   => $field,
44                           layout   => 'horiz',
45                       )
46             %>
47           </TABLE>
48         </TD>
49       </TR>
50
51 %   }
52
53     <% include( '/elements/tr-select-payby.html',
54                   'payby_type'   => 'cust',
55                   'multiple'     => 1,
56                   'all_selected' => 1,
57               )
58     %>
59
60     <TR>
61       <TD ALIGN="right">Payment expiration before</TD>
62       <TD>
63         <SELECT NAME="paydate_month" DISABLED>
64 %         foreach my $month ( 1 .. 12 ) {
65             <OPTION VALUE="<% $month %>"><% $month %></OPTION>
66 %         }
67         </SELECT>
68         /
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>
74 %         }
75         </SELECT>
76       </TD>
77     </TR>
78
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;
83         if ( value == '' ) {
84           month_select.disabled = true;
85         } else {
86           month_select.disabled = false;
87         }
88       }
89     </SCRIPT>
90  
91     <TR>
92       <TD ALIGN="right">Invoice terms</TD>
93       <TD>
94         <% include( '/elements/select-terms.html',
95                       'pre_options' => [ '' => 'all' ],
96                       'empty_value' => 'NULL',
97                   )
98         %>
99       </TD>
100     </TR>
101     
102     <% include( '/elements/tr-input-lessthan_greaterthan.html',
103                   label   => 'Current balance',
104                   field   => 'current_balance',
105               )
106     %>
107
108     <TR>
109       <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
110         <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
111     </TR>
112
113     <TR>
114       <TD ALIGN="right" VALIGN="center">Without census tract</TD>
115         <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
116     </TR>
117
118 %   if ( $conf->exists('enable_taxproducts') ) {
119
120       <TR>
121         <TD ALIGN="right" VALIGN="center">With hardcoded tax location</TD>
122           <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
123       </TR>
124
125 %   }
126
127     <TR>
128       <TH CLASS="background" COLSPAN=2>&nbsp;</TH>
129     </TR>
130
131     <TR>
132       <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
133     </TR>
134     <% include( '/elements/tr-select-cust-fields.html' ) %>
135
136     <TR>
137       <TD ALIGN="right" VALIGN="center">Add package columns</TD>
138         <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
139     </TR>
140   </TABLE>
141
142 <BR>
143 <INPUT TYPE="submit" VALUE="Get Report">
144
145 </FORM>
146
147 <% include('/elements/footer.html') %>
148 <%init>
149
150 die "access denied"
151   unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
152            $FS::CurrentUser::CurrentUser->access_right('List packages')
153          );
154
155 my $conf = new FS::Conf;
156
157 </%init>
158 <%once>
159
160 my %label = (
161   'signupdate'     => 'Signup date',
162 );
163
164 </%once>