1 <% include('/elements/header.html', 'Tax Report' ) %>
3 <FORM ACTION="report_tax.cgi" METHOD="GET">
7 % if ( $conf->config('tax-report_groups') ) {
8 % my @lines = $conf->config('tax-report_groups');
11 <TD ALIGN="right">Tax group</TD>
13 <SELECT NAME="report_group">
15 <OPTION VALUE="">all</OPTION>
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);
22 <OPTION VALUE="<% "$op $value" %>"><% $label %></OPTION>
31 <% include( '/elements/tr-select-agent.html', 'disable_empty'=>0 ) %>
33 <% include( '/elements/tr-input-beginning_ending.html' ) %>
37 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="show_cities" VALUE="1"></TD>
42 % if ( $conf->exists('enable_taxclasses') ) {
44 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="show_taxclasses" VALUE="1"></TD>
45 <TD>Show tax classes</TD>
49 % my @pkg_class = qsearch('pkg_class', {});
52 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="show_pkgclasses" VALUE="1"></TD>
53 <TD>Show package classes</TD>
59 <BR><INPUT TYPE="submit" VALUE="Get Report">
63 <% include('/elements/footer.html') %>
67 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
69 my $conf = new FS::Conf;
71 my $city_sql = "SELECT COUNT(*) FROM cust_main_county
72 WHERE city != '' AND city IS NOT NULL
75 my $city_sth = dbh->prepare($city_sql) or die dbh->errstr;
76 $city_sth->execute or die $city_sth->errstr;
77 my $city = $city_sth->fetchrow_arrayref->[0];