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