add a config option for some basic tax grouping by name, RT#5446
[freeside.git] / httemplate / search / report_tax.html
1 <% include('/elements/header.html', 'Tax Report' ) %>
2
3 <FORM ACTION="report_tax.cgi" METHOD="GET">
4
5 <TABLE>
6
7 % if ( $conf->config('tax-report_groups') ) {
8 %   my @lines = $conf->config('tax-report_groups');
9     
10   <TR>
11     <TD ALIGN="right">Tax group</TD>
12     <TD>
13       <SELECT NAME="report_group">
14
15         <OPTION VALUE="">all</OPTION>
16
17 %       foreach my $line ( @lines ) {
18 %         $line =~ /^\s*(.+)\s+(=|!=)\s+(.*)\s*$/ #or next;
19 %           or do { warn "bad report_group line: $line\n"; next; };
20 %         my($label, $op, $value) = ($1, $2, $3);
21
22           <OPTION VALUE="<% "$op $value" %>"><% $label %></OPTION>
23 %       }
24
25       </SELECT>
26     </TD>
27   </TR>
28
29 % }
30
31  <% include( '/elements/tr-select-agent.html', 'disable_empty'=>0 ) %>
32
33  <% include( '/elements/tr-input-beginning_ending.html' ) %>
34
35 %    if ( $conf->exists('enable_taxclasses') ) {
36    <TR>
37      <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="show_taxclasses" VALUE="1"></TD>
38      <TD>Show tax classes</TD>
39    </TR>
40 % } 
41
42 % my @pkg_class = qsearch('pkg_class', {});
43 % if ( @pkg_class ) {
44    <TR>
45      <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="show_pkgclasses" VALUE="1"></TD>
46      <TD>Show package classes</TD>
47    </TR>
48 % } 
49
50 </TABLE>
51
52 <BR><INPUT TYPE="submit" VALUE="Get Report">
53
54 </FORM>
55
56 <% include('/elements/footer.html') %>
57 <%init>
58
59 die "access denied"
60   unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
61
62 my $conf = new FS::Conf;
63
64 </%init>