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