1 <% include('elements/edit.html',
3 'name' => 'Tax rate', #Edit tax rate
4 'table' => 'cust_main_county',
5 'labels' => { 'taxnum' => 'Tax',
6 'country' => 'Country',
9 'taxclass' => 'Tax class',
10 'taxname' => 'Tax name',
12 'setuptax' => 'This tax not applicable to setup fees',
13 'recurtax' => 'This tax not applicable to recurring fees',
14 'exempt_amount' => 'Monthly exemption per customer ($25 "Texas tax")',
21 my $conf = new FS::Conf;
27 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
30 if ( $cgi->param('error') ) {
31 $cgi->param('taxnum') =~ /^(\d+)$/
32 or die "no taxnum, but error: ". $cgi->param('error');
35 my($query) = $cgi->keywords;
36 $query =~ /^(\d+)$/ or die 'no taxnum';
40 my $cust_main_county = qsearchs('cust_main_county', { 'taxnum' => $taxnum })
41 or die "unknown taxnum $1";
44 { field=>'country', type=>'fixed-country', },
45 { field=>'state', type=>'fixed-state', },
46 { field=>'county', type=>'fixed', },
49 push @fields, { field=>'taxclass', type=>'fixed', }
50 if $conf->exists('enable_taxclasses');
54 { field=>'tax', type=>'percentage', },
56 { type=>'tablebreak-tr-title', value=>'Exemptions' },
57 { field=>'setuptax', type=>'checkbox', value=>'Y', },
58 { field=>'recurtax', type=>'checkbox', value=>'Y', },
59 { field=>'exempt_amount', type=>'money', },