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 'district' => 'District',
11 'taxclass' => 'Tax class',
12 'taxname' => 'Tax name',
14 'setuptax' => 'This tax not applicable to setup fees',
15 'recurtax' => 'This tax not applicable to recurring fees',
16 'exempt_amount' => 'Monthly exemption per customer ($25 "Texas tax")',
23 my $conf = new FS::Conf;
29 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
32 if ( $cgi->param('error') ) {
33 $cgi->param('taxnum') =~ /^(\d+)$/
34 or die "no taxnum, but error: ". $cgi->param('error');
37 my($query) = $cgi->keywords;
38 $query =~ /^(\d+)$/ or die 'no taxnum';
42 my $cust_main_county = qsearchs('cust_main_county', { 'taxnum' => $taxnum })
43 or die "unknown taxnum $1";
46 { field=>'country', type=>'fixed-country', },
47 { field=>'state', type=>'fixed-state', },
48 { field=>'county', type=>'fixed', },
49 { field=>'city', type=>'fixed', },
50 { field=>'source', type=>'hidden', },
53 push @fields, { field=>'district', type=>'fixed', }
54 if $cust_main_county->district;
56 push @fields, { field=>'taxclass', type=>'fixed', }
57 if $conf->exists('enable_taxclasses');
61 { field=>'tax', type=>'percentage', },
63 { type=>'tablebreak-tr-title', value=>'Exemptions' },
64 { field=>'setuptax', type=>'checkbox', value=>'Y', },
65 { field=>'recurtax', type=>'checkbox', value=>'Y', },
66 { field=>'exempt_amount', type=>'money', },