This commit was generated by cvs2svn to compensate for changes in r6252,
[freeside.git] / httemplate / edit / cust_main_county.html
1 <% include('elements/edit.html',
2      'popup'  => 1,
3      'name'   => 'Tax rate', #Edit tax rate
4      'table'  => 'cust_main_county',
5      'labels' => { 'taxnum'   => 'Tax',
6                    'country'  => 'Country',
7                    'state'    => 'State',
8                    'county'   => 'County',
9                    'taxclass' => 'Tax class',
10                    'taxname'  => 'Tax name',
11                    'tax'      => 'Tax rate',
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")',
15                  },
16      'fields' => \@fields,
17    )
18 %>
19 <%once>
20
21 my $conf = new FS::Conf;
22
23 </%once>
24
25 <%init>
26
27 die "access denied"
28   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
29
30 my $taxnum;
31 if ( $cgi->param('error') ) {
32   $cgi->param('taxnum') =~ /^(\d+)$/ or die 'error, but no taxnum';
33   $taxnum = $1;
34 } else {
35   my($query) = $cgi->keywords;
36   $query =~ /^(\d+)$/ or die 'no taxnum';
37   $taxnum = $1;
38 }
39
40 my $cust_main_county = qsearchs('cust_main_county', { 'taxnum' => $taxnum })
41   or die "unknown taxnum $1";
42
43 my @fields = (
44   { field=>'country',  type=>'fixed-country', },
45   { field=>'state',    type=>'fixed-state', },
46   { field=>'county',   type=>'fixed', },
47 );
48
49 push @fields, { field=>'taxclass', type=>'fixed', }
50   if $conf->exists('enable_taxclasses');
51
52 push @fields,
53   'taxname',
54   { field=>'tax',      type=>'percentage', },
55
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', },
60 ;
61
62 </%init>