invoice_sections_with_taxes per-agent, RT#79636
[freeside.git] / httemplate / misc / enable_or_disable_tax.html
1 <% include('/elements/header-popup.html', ucfirst($action). ' Tax Rates') %>
2 <% include('/elements/error.html') %>
3
4 <FORM ACTION="<% popurl(1) %>process/enable_or_disable_tax.html" METHOD=POST>
5 <INPUT TYPE="hidden" NAME="action" VALUE="<% $action %>">
6 <INPUT TYPE="hidden" NAME="data_vendor" VALUE="<% $cgi->param('data_vendor') %>">
7 <INPUT TYPE="hidden" NAME="geocode" VALUE="<% $cgi->param('geocode') %>">
8 <INPUT TYPE="hidden" NAME="taxclassnum" VALUE="<% $cgi->param('taxclassnum') %>">
9 <INPUT TYPE="hidden" NAME="tax_type" VALUE="<% $cgi->param('tax_type') %>">
10 <INPUT TYPE="hidden" NAME="tax_cat" VALUE="<% $cgi->param('tax_cat') %>">
11 <INPUT TYPE="hidden" NAME="showdisabled" VALUE="<% $cgi->param('showdisabled') |h %>">
12
13 This will <B><% $action %></B> <% $count %> tax
14 <% $count == 1 ? 'rate' : 'rates' %>.  Are you <B>certain</B> you want to do
15 this?
16 <BR><BR><INPUT TYPE="submit" VALUE="Yes">
17 </FORM>
18
19 <%init>
20
21 die "access denied"
22   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
23
24 my $action = '';
25 if ( $cgi->param('action') =~ /^(\w+)$/ ) {
26   $action = $1;
27 }
28
29 my ($query, $count_query) = FS::tax_rate::browse_queries(scalar($cgi->Vars));
30
31 my $count_sth = dbh->prepare($count_query)
32   or die "Error preparing $count_query: ". dbh->errstr;
33 $count_sth->execute
34   or die "Error executing $count_query: ". $count_sth->errstr;
35 my $count = $count_sth->fetchrow_arrayref->[0];
36
37 </%init>