summaryrefslogtreecommitdiff
path: root/httemplate/misc/enable_or_disable_tax.html
blob: 0efd07d197415b6b45359dc11cf615168222754b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<% include('/elements/header-popup.html', ucfirst($action). ' Tax Rates') %>
<% include('/elements/error.html') %>

<FORM ACTION="<% popurl(1) %>process/enable_or_disable_tax.html" METHOD=POST>
<INPUT TYPE="hidden" NAME="action" VALUE="<% $action %>">
<INPUT TYPE="hidden" NAME="data_vendor" VALUE="<% $cgi->param('data_vendor') %>">
<INPUT TYPE="hidden" NAME="geocode" VALUE="<% $cgi->param('geocode') %>">
<INPUT TYPE="hidden" NAME="taxclassnum" VALUE="<% $cgi->param('taxclassnum') %>">
<INPUT TYPE="hidden" NAME="tax_type" VALUE="<% $cgi->param('tax_type') %>">
<INPUT TYPE="hidden" NAME="tax_cat" VALUE="<% $cgi->param('tax_cat') %>">
<INPUT TYPE="hidden" NAME="showdisabled" VALUE="<% $cgi->param('showdisabled') |h %>">

This will <B><% $action %></B> <% $count %> tax
<% $count == 1 ? 'rate' : 'rates' %>.  Are you <B>certain</B> you want to do
this?
<BR><BR><INPUT TYPE="submit" VALUE="Yes">
</FORM>

<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my $action = '';
if ( $cgi->param('action') =~ /^(\w+)$/ ) {
  $action = $1;
}

my ($query, $count_query) = FS::tax_rate::browse_queries(scalar($cgi->Vars));

my $count_sth = dbh->prepare($count_query)
  or die "Error preparing $count_query: ". dbh->errstr;
$count_sth->execute
  or die "Error executing $count_query: ". $count_sth->errstr;
my $count = $count_sth->fetchrow_arrayref->[0];

</%init>