1 <% include('elements/edit.html',
3 'name' => 'Tax rate', #Edit tax rate
11 my $conf = new FS::Conf;
18 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
21 if ( $cgi->param('error') ) {
22 $cgi->param('taxnum') =~ /^(\d+)$/ or die 'error, but no taxnum';
25 my($query) = $cgi->keywords;
26 $query =~ /^(\d+)$/ or die 'no taxnum';
30 my $tax_rate = qsearchs('tax_rate', { 'taxnum' => $taxnum })
31 or die "unknown taxnum $1";
33 my $labels = { 'taxnum' => 'Tax',
34 'data_vendor' => 'Data vendor',
35 'geocode' => 'Vendor location code',
36 'location' => 'Tax auth loc code',
37 'taxclass_description' => 'Tax class',
38 'taxname' => 'Tax name',
39 'effective_date' => 'Effective date',
40 'tax' => 'Tax rate (1st bracket)',
41 'excessrate' => 'Tax rate (2nd bracket)',
42 'taxbase' => 'First bracket',
43 'taxmax' => 'Max tax',
44 'usetax' => 'Use tax rate (1st bracket)',
45 'useexcessrate' => 'Use tax rate (2nd bracket)',
46 'unittype_name' => 'Units',
47 'fee' => 'Fee per unit (1st bracket)',
48 'excessfee' => 'Fee per unit (2st bracket)',
49 'feebase' => 'Units in first bracket',
50 'feemax' => 'Max Units',
51 'maxtype_name' => 'Threshold accumulation',
52 'taxauth_name', => 'Tax authority',
53 'basetype_name' => 'Basis',
54 'passtype_name' => 'Passthru',
55 'passflag' => 'Passable',
56 'setuptax' => 'This tax not applicable to setup fees',
57 'recurtax' => 'This tax not applicable to recurring fees',
61 { type=>'tablebreak-tr-title', value=>'Location' },
62 { field=>'data_vendor', type=>'hidden',},
63 { field=>'geocode', type=>'fixed' },
64 { field=>'taxclassnum', type=>'hidden' } ,
65 { field=>'taxclass_description', type=>'fixed' } ,
66 { field=>'taxname', type=>'text' } ,
67 { field=>'effective_date', type=>'fixed' } ,
68 { field=>'location', type=>'text' },
69 { type=>'tablebreak-tr-title', value=>'Money based rates' },
70 { field=>'tax', type=>'percentage' } ,
71 { field=>'excessrate', type=>'percentage' } ,
72 { field=>'taxbase', type=>'money' } ,
73 { field=>'taxmax', type=>'money' } ,
74 { field=>'usetax', type=>'percentage' } ,
75 { field=>'useexcessrate', type=>'percentage' } ,
76 { type=>'tablebreak-tr-title', value=>'Service based rates' },
77 { field=>'unittype', type=>'hidden' } ,
78 { field=>'unittype_name', type=>'fixed' } ,
79 { field=>'fee', type=>'money' } ,
80 { field=>'excessfee', type=>'money' } ,
81 { field=>'feebase', type=>'text' } ,
82 { field=>'feemax', type=>'text' } ,
83 { type=>'tablebreak-tr-title', value=>'Taxation rules' },
84 { field=>'maxtype', type=>'hidden' } ,
85 { field=>'maxtype_name', type=>'fixed' } ,
86 { field=>'taxauth', type=>'hidden' } ,
87 { field=>'taxauth_name', type=>'fixed' } ,
88 { field=>'basetype', type=>'hidden' } ,
89 { field=>'basetype_name', type=>'fixed' } ,
90 { field=>'passtype', type=>'hidden' } ,
91 { field=>'passtype_name', type=>'fixed' } ,
92 { field=>'passflag', type=>'fixed' } ,
93 { field=>'setuptax', type=>'checkbox' } ,
94 { field=>'recurtax', type=>'checkbox' } ,
95 { field=>'manual', type=>'hidden', value=>'Y' } ,
99 # { type=>'tablebreak-tr-title', value=>'Exemptions' },
100 # { field=>'setuptax', type=>'checkbox', value=>'Y', },
101 # { field=>'recurtax', type=>'checkbox', value=>'Y', },
102 # { field=>'exempt_amount', type=>'money', },