combine ticket notification scrips, #15353
[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     <TR>
29       <TD ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD>
30       <TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
31     </TR>
32
33     <TR>
34         <TD ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TD>
35         <TD>
36         <TABLE>
37             <& /elements/tr-input-beginning_ending.html,
38                       prefix   => 'signupdate',
39                       layout   => 'horiz',
40             &>
41         </TABLE>
42         </TD>
43     </TR>
44
45     <& /elements/tr-select-cust_tag.html,
46                   'cgi'          => $cgi,
47                   'is_report'    => 1,
48                   'multiple'     => 1,
49     &>
50
51     <& /elements/tr-select-payby.html,
52                   'payby_type'   => 'cust',
53                   'multiple'     => 1,
54                   'all_selected' => 1,
55     &>
56
57     <TR>
58       <TD ALIGN="right"><% mt('Payment expiration before') |h %></TD>
59       <TD>
60         <SELECT NAME="paydate_month" DISABLED>
61 %         foreach my $month ( 1 .. 12 ) {
62             <OPTION VALUE="<% $month %>"><% $month %></OPTION>
63 %         }
64         </SELECT>
65         /
66         <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
67           <OPTION VALUE=""></OPTION>
68 %         my $lastyear = (localtime(time))[5] + 1899;
69 %         foreach my $year ( $lastyear .. $lastyear+12 ) {
70             <OPTION VALUE="<% $year %>"><% $year %></OPTION>
71 %         }
72         </SELECT>
73       </TD>
74     </TR>
75
76     <SCRIPT TYPE="text/javascript">
77       function paydate_year_changed(what) {
78         var value = what.options[what.selectedIndex].value;
79         var month_select = what.form.paydate_month;
80         if ( value == '' ) {
81           month_select.disabled = true;
82         } else {
83           month_select.disabled = false;
84         }
85       }
86     </SCRIPT>
87  
88     <TR>
89       <TD ALIGN="right"><% mt('Invoice terms') |h %></TD>
90       <TD>
91         <& /elements/select-terms.html,
92                       'pre_options' => [ '' => emt('all') ],
93                       'empty_value' => 'NULL',
94         &>
95       </TD>
96     </TR>
97     
98     <& /elements/tr-input-lessthan_greaterthan.html,
99                   label   => emt('Current balance'),
100                   field   => 'current_balance',
101     &>
102
103     <TR>
104       <TD ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TD>
105         <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
106     </TR>
107
108     <TR>
109       <TD ALIGN="right" VALIGN="center"><% mt('Without census tract') |h %></TD>
110         <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
111     </TR>
112
113 %   if ( $conf->exists('enable_taxproducts') ) {
114
115       <TR>
116         <TD ALIGN="right" VALIGN="center"><% mt('With hardcoded tax location') |h %></TD>
117           <TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
118       </TR>
119
120 %   }
121
122     <TR>
123       <TH CLASS="background" COLSPAN=2>&nbsp;</TH>
124     </TR>
125
126     <TR>
127       <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
128     </TR>
129     <& /elements/tr-select-cust-fields.html &>
130
131     <TR>
132       <TD ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TD>
133         <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
134     </TR>
135   </TABLE>
136
137 <BR>
138 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
139
140 </FORM>
141
142 <& /elements/footer.html &>
143 <%init>
144
145 die "access denied"
146   unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
147            $FS::CurrentUser::CurrentUser->access_right('List packages')
148          );
149
150 my $conf = new FS::Conf;
151
152 </%init>