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