well, allow things to work for now so work can get done
authorivan <ivan>
Wed, 10 Sep 2008 07:32:17 +0000 (07:32 +0000)
committerivan <ivan>
Wed, 10 Sep 2008 07:32:17 +0000 (07:32 +0000)
FS/FS/part_pkg.pm

index 0591af4..d8b5e9c 100644 (file)
@@ -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';