This commit was generated by cvs2svn to compensate for changes in r10640,
[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-cust_tag.html',
54                   'cgi'          => $cgi,
55                   'is_report'    => 1,
56                   'multiple'     => 1,
57               )
58     %>
59
60     <% include( '/elements/tr-select-payby.html',
61                   'payby_type'   => 'cust',
62                   'multiple'     => 1,
63                   'all_selected' => 1,
64               )
65     %>
66
67     <TR>
68       <TD ALIGN="right">Payment expiration before</TD>
69       <TD>
70         <SELECT NAME="paydate_month" DISABLED>
71 %         foreach my $month ( 1 .. 12 ) {
72             <OPTION VALUE="<% $month %>"><% $month %></OPTION>
73 %         }
74         </SELECT>
75         /
76         <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
77           <OPTION VALUE=""></OPTION>
78 %         my $lastyear = (localtime(time))[5] + 1899;
79 %         foreach my $year ( $lastyear .. $lastyear+12 ) {
80             <OPTION VALUE="<% $year %>"><% $year %></OPTION>
81 %         }
82         </SELECT>
83       </TD>
84     </TR>
85
86     <SCRIPT TYPE="text/javascript">
87       function paydate_year_changed(what) {
88         var value = what.options[what.selectedIndex].value;
89         var month_select = what.form.paydate_month;
90         if ( value == '' ) {
91           month_select.disabled = true;
92         } else {
93           month_select.disabled = false;
94         }
95       }
96     </SCRIPT>
97  
98     <TR>
99       <TD ALIGN="right">Invoice terms</TD>
100       <TD>
101         <% include( '/elements/select-terms.html',
102                       'pre_options' => [ '' => 'all' ],
103                       'empty_value' => 'NULL',
104                   )
105         %>
106       </TD>
107     </TR>
108     
109     <% include( '/elements/tr-input-lessthan_greaterthan.html',
110                   label   => 'Current balance',
111                   field   => 'current_balance',
112               )
113     %>
114
115     <TR>
116       <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
117         <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
118     </TR>
119
120     <TR>
121       <TD ALIGN="right" VALIGN="center">Without census tract</TD>
122         <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
123     </TR>
124
125 %   if ( $conf->exists('enable_taxproducts') ) {
126
127       <TR>
128         <TD ALIGN="right" VALIGN="center">With hardcoded tax location</TD>
129           <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
130       </TR>
131
132 %   }
133
134     <TR>
135       <TH CLASS="background" COLSPAN=2>&nbsp;</TH>
136     </TR>
137
138     <TR>
139       <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
140     </TR>
141     <% include( '/elements/tr-select-cust-fields.html' ) %>
142
143     <TR>
144       <TD ALIGN="right" VALIGN="center">Add package columns</TD>
145         <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
146     </TR>
147   </TABLE>
148
149 <BR>
150 <INPUT TYPE="submit" VALUE="Get Report">
151
152 </FORM>
153
154 <% include('/elements/footer.html') %>
155 <%init>
156
157 die "access denied"
158   unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
159            $FS::CurrentUser::CurrentUser->access_right('List packages')
160          );
161
162 my $conf = new FS::Conf;
163
164 </%init>
165 <%once>
166
167 my %label = (
168   'signupdate'     => 'Signup date',
169 );
170
171 </%once>