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