X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg_taxproduct.pm;h=e86d0285a4d33ebba9b9b9df08fd3d6eb995e128;hb=29d80a8582103ead0b5910391cabc45cb85fa836;hp=c12a432a3737674cdfb4f9f3168623ed1852fbdc;hpb=7516e3da0f17eeecba27219ef96a8b5f46af2083;p=freeside.git diff --git a/FS/FS/part_pkg_taxproduct.pm b/FS/FS/part_pkg_taxproduct.pm index c12a432a3..e86d0285a 100644 --- a/FS/FS/part_pkg_taxproduct.pm +++ b/FS/FS/part_pkg_taxproduct.pm @@ -153,7 +153,11 @@ sub part_pkg_taxrate { map { $_->taxproductnum } $self->expand_cch_taxproduct ); - $extra_sql .= "AND taxproductnum IN($tpnums)"; + + # if there are no taxproductnums, there are no matching tax classes + return if length($tpnums) == 0; + + $extra_sql .= " AND taxproductnum IN($tpnums)"; my $addl_from = 'LEFT JOIN part_pkg_taxproduct USING ( taxproductnum )'; my $order_by = 'ORDER BY taxclassnum, length(geocode) desc, length(taxproduct) desc';