X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-taxclass.html;h=97f3cad0b3f04aeda7a4c73c4e96b2c6101f6530;hb=c76dee5b859e969a9a1610be53122981f5690687;hp=981c1a5f2b72a9b538b73f2bc4f5b3419c478346;hpb=5703b343f5a7184814e8e545e123c1544af2c521;p=freeside.git diff --git a/httemplate/elements/tr-select-taxclass.html b/httemplate/elements/tr-select-taxclass.html index 981c1a5f2..97f3cad0b 100644 --- a/httemplate/elements/tr-select-taxclass.html +++ b/httemplate/elements/tr-select-taxclass.html @@ -9,7 +9,11 @@ <% $opt{'label'} || 'Tax class: ' %> - <% include( '/elements/select-taxclass.html', 'curr_value' => $selected_taxclass, %opt ) %> + <% include( '/elements/select-taxclass.html', + 'curr_value' => $selected_taxclass, + %opt + ) + %> @@ -23,9 +27,9 @@ my $selected_taxclass = $opt{'curr_value'}; # || $opt{'value'} necessary? unless ( $opt{'taxclasses'} ) { #my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county') - my $sth = dbh->prepare('SELECT taxclass FROM part_pkg_taxclass') + my $sth = dbh->prepare("SELECT taxclass FROM part_pkg_taxclass WHERE disabled IS NULL OR disabled = '' OR taxclass = ?") or die dbh->errstr; - $sth->execute or die $sth->errstr; + $sth->execute($selected_taxclass) or die $sth->errstr; my %taxclasses = map { $_->[0] => 1 } @{$sth->fetchall_arrayref}; @{ $opt{'taxclasses'} } = grep $_, keys %taxclasses;