2 % my $conf = new FS::Conf;
3 % my $selected_taxclass = scalar(@_) ? shift : '';
5 % if ( $conf->exists('enable_taxclasses') ) {
8 <SELECT NAME="taxclass">
9 % if ( $conf->exists('require_taxclasses') ) {
12 <OPTION VALUE="(select)">Select tax class
19 % my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county')
21 % $sth->execute or die $sth->errstr;
22 % my %taxclasses = map { $_->[0] => 1 } @{$sth->fetchall_arrayref};
23 % my @taxclasses = grep $_, keys %taxclasses;
25 % foreach my $taxclass ( @taxclasses ) {
28 <OPTION VALUE="<% $taxclass %>"<% $taxclass eq $selected_taxclass ? ' SELECTED' : '' %>><% $taxclass %>
36 <INPUT TYPE="hidden" NAME="taxclass" VALUE="<% $selected_taxclass %>">