X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg.pm;h=d8b5e9c69bc9be346c2e222d90abd06b9ac40b21;hb=235173ad9493f90dba2842cd33aa886cacbbee15;hp=0591af487a1a1c300f1f5fc91209c6a42fcabc5f;hpb=d7b220cb7443a6d55723e4b5b9d483504efe9250;p=freeside.git diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index 0591af487..d8b5e9c69 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -956,11 +956,11 @@ sub part_pkg_taxrate { ). ')'; # much more CCH oddness in m2m -- this is kludgy + my @tpnums = $self->_expand_cch_taxproductnum($class); $extra_sql .= ' AND ('. - join(' OR ', map{ "taxproductnum = $_" } - $self->_expand_cch_taxproductnum($class) - ). - ')'; + join(' OR ', map{ "taxproductnum = $_" } @tpnums ). + ')' + if @tpnums; my $addl_from = 'LEFT JOIN part_pkg_taxproduct USING ( taxproductnum )'; my $order_by = 'ORDER BY taxclassnum, length(geocode) desc, length(taxproduct) desc';