X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg.pm;h=77f70e4a3ccfb6d94d6c8807fe52d90cfb785143;hb=f923be3caa64d3e539fbc5e81d22a44479f2774c;hp=f408552e36dac21151ffff71eaf6e42db5f81b1e;hpb=f9930edeaceb217a6503fa49078fcff2b588caf8;p=freeside.git diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index f408552e3..77f70e4a3 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -31,7 +31,7 @@ use FS::part_pkg_discount; use FS::part_pkg_vendor; use FS::part_pkg_currency; -$DEBUG = 1; +$DEBUG = 0; $setup_hack = 0; $skip_pkg_svc_hack = 0; @@ -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"