don't redirect to a GET with sensitive data, RT#26099
[freeside.git] / httemplate / search / report_cust_main.html
1 <& /elements/header.html, mt('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"><% mt('Search options') |h %></FONT></TH>
10     </TR>
11
12     <& /elements/tr-select-agent.html,
13                   'curr_value'    => scalar($cgi->param('agentnum')),
14                   'disable_empty' => 0,
15     &>
16
17     <& /elements/tr-select-cust_main-status.html,
18                   'label' => emt('Status'),
19     &>
20
21     <& /elements/tr-select-cust_class.html,
22                   'label'        => emt('Class'),
23                   'multiple'     => 1,
24                   'pre_options'  => [ '' => emt('(none)') ],
25                   'all_selected' => 1,
26     &>
27
28     <& /elements/tr-select-part_referral.html,
29                   'label'        => emt('Advertising Source'),
30                   'multiple'     => 1,
31                   #no, causes customers with disabled ones to disappear
32                   #'all_selected' => 1,
33     &>
34
35     <TR>
36       <TD ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD>
37       <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
38     </TR>
39
40     <TR>
41         <TD ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TD>
42         <TD>
43         <TABLE>
44             <& /elements/tr-input-beginning_ending.html,
45                       prefix   => 'signupdate',
46                       layout   => 'horiz',
47             &>
48         </TABLE>
49         </TD>
50     </TR>
51
52 %    if ( $conf->exists('cust_main-enable_birthdate') ) {
53       <TR>
54           <TD ALIGN="right" VALIGN="center"><% mt('Date of Birth') |h %></TD>
55           <TD>
56           <TABLE>
57               <& /elements/tr-input-beginning_ending.html,
58                         prefix   => 'birthdate',
59                         layout   => 'horiz',
60               &>
61           </TABLE>
62           </TD>
63       </TR>
64 %   }
65
66 %    if ( $conf->exists('cust_main-enable_spouse_birthdate') ) {
67       <TR>
68           <TD ALIGN="right" VALIGN="center"><% mt('Spouse Date of Birth') |h %></TD>
69           <TD>
70           <TABLE>
71               <& /elements/tr-input-beginning_ending.html,
72                         prefix   => 'spouse_birthdate',
73                         layout   => 'horiz',
74               &>
75           </TABLE>
76           </TD>
77       </TR>
78 %   }
79
80 %    if ( $conf->exists('cust_main-enable_anniversary_date') ) {
81       <TR>
82           <TD ALIGN="right" VALIGN="center"><% mt('Anniversary Date') |h %></TD>
83           <TD>
84           <TABLE>
85               <& /elements/tr-input-beginning_ending.html,
86                         prefix   => 'anniversary_date',
87                         layout   => 'horiz',
88               &>
89           </TABLE>
90           </TD>
91       </TR>
92 %   }
93
94     <& /elements/tr-select-cust_tag.html,
95                   'cgi'          => $cgi,
96                   'is_report'    => 1,
97                   'multiple'     => 1,
98     &>
99
100     <& /elements/tr-select-payby.html,
101                   'payby_type'   => 'cust',
102                   'multiple'     => 1,
103                   'all_selected' => 1,
104     &>
105
106     <TR>
107       <TD ALIGN="right"><% mt('Payment expiration before') |h %></TD>
108       <TD>
109         <SELECT NAME="paydate_month" DISABLED>
110 %         foreach my $month ( 1 .. 12 ) {
111             <OPTION VALUE="<% $month %>"><% $month %></OPTION>
112 %         }
113         </SELECT>
114         /
115         <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
116           <OPTION VALUE=""></OPTION>
117 %         my $lastyear = (localtime(time))[5] + 1899;
118 %         foreach my $year ( $lastyear .. $lastyear+12 ) {
119             <OPTION VALUE="<% $year %>"><% $year %></OPTION>
120 %         }
121         </SELECT>
122       </TD>
123     </TR>
124
125     <SCRIPT TYPE="text/javascript">
126       function paydate_year_changed(what) {
127         var value = what.options[what.selectedIndex].value;
128         var month_select = what.form.paydate_month;
129         if ( value == '' ) {
130           month_select.disabled = true;
131         } else {
132           month_select.disabled = false;
133         }
134       }
135     </SCRIPT>
136  
137     <TR>
138       <TD ALIGN="right"><% mt('Invoice terms') |h %></TD>
139       <TD>
140         <& /elements/select-terms.html,
141                       'pre_options' => [ '' => emt('all') ],
142                       'empty_value' => 'NULL',
143         &>
144       </TD>
145     </TR>
146     
147     <& /elements/tr-input-lessthan_greaterthan.html,
148                   label   => emt('Current balance'),
149                   field   => 'current_balance',
150     &>
151
152     <TR>
153       <TD ALIGN="right" VALIGN="center"><% mt('Without census tract') |h %></TD>
154         <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
155     </TR>
156
157 %   if ( $conf->exists('enable_taxproducts') ) {
158
159       <TR>
160         <TD ALIGN="right" VALIGN="center"><% mt('With hardcoded tax location') |h %></TD>
161           <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
162       </TR>
163
164 %   }
165
166     <TR>
167       <TD ALIGN="right" VALIGN="center"><% mt('With email address(es)') |h %></TD>
168         <TD><INPUT TYPE="checkbox" NAME="with_email"></TD>
169     </TR>
170
171     <TR>
172       <TD ALIGN="right" VALIGN="center"><% mt('Without postal mail invoices') |h %></TD>
173         <TD><INPUT TYPE="checkbox" NAME="no_POST"></TD>
174     </TR>
175
176     <TR>
177       <TH CLASS="background" COLSPAN=2>&nbsp;</TH>
178     </TR>
179
180     <TR>
181       <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
182     </TR>
183     <& /elements/tr-select-cust-fields.html &>
184
185     <TR>
186       <TD ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TD>
187         <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
188     </TR>
189
190     <TR>
191       <TD ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TD>
192         <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
193     </TR>
194
195   </TABLE>
196
197 <BR>
198 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
199
200 </FORM>
201
202 <& /elements/footer.html &>
203 <%init>
204
205 die "access denied"
206   unless $FS::CurrentUser::CurrentUser->access_right('Advanced customer search');
207
208 my $conf = new FS::Conf;
209
210 </%init>