X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg.pm;h=77f70e4a3ccfb6d94d6c8807fe52d90cfb785143;hp=042cb5c564d7de7afa85c27ef8c09469d1acdee9;hb=60dc4fe638eb9abc5a3ea92d43031dcbfeb71454;hpb=5ef5203cb6da8e0a8e1f60228b9a9250605f404e diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index 042cb5c56..77f70e4a3 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -1561,8 +1561,10 @@ package in the location specified by GEOCODE, for usage class CLASS (one of sub tax_rates { my $self = shift; my ($vendor, $geocode, $class) = @_; + # if this part_pkg is overridden into a specific taxclass, get that class my @taxclassnums = map { $_->taxclassnum } $self->part_pkg_taxoverride($class); + # otherwise, get its tax product category if (!@taxclassnums) { my $part_pkg_taxproduct = $self->taxproduct($class); # If this isn't defined, then the class has no taxproduct designation, @@ -1583,7 +1585,8 @@ sub tax_rates { my $extra_sql = "AND taxclassnum IN (". join(',', @taxclassnums) . ")"; my @taxes = qsearch({ 'table' => 'tax_rate', 'hashref' => { 'geocode' => $geocode, - 'data_vendor' => $vendor }, + 'data_vendor' => $vendor, + 'disabled' => '' }, 'extra_sql' => $extra_sql, }); warn "Found taxes ". join(',', map {$_->taxnum} @taxes) ."\n"