? ( split ':', $part_pkg_taxproduct->taxproduct )
: ()
);
+ $a = '' unless $a; $b = '' unless $b; $c = '' unless $c; $d = '' unless $d;
my $extra_sql = "AND ( taxproduct = '$a:$b:$c:$d'
OR taxproduct = '$a:$b:$c:'
OR taxproduct = '$a:$b:".":$d'
).
')';
# 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';