projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0bab56e
)
the taxproductnum is ALWAYS one of the filtering conditions
author
jeff
<jeff>
Tue, 3 Feb 2009 21:33:12 +0000
(21:33 +0000)
committer
jeff
<jeff>
Tue, 3 Feb 2009 21:33:12 +0000
(21:33 +0000)
FS/FS/part_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg.pm
b/FS/FS/part_pkg.pm
index
563a5cf
..
e53d7b8
100644
(file)
--- a/
FS/FS/part_pkg.pm
+++ b/
FS/FS/part_pkg.pm
@@
-1015,10
+1015,13
@@
sub part_pkg_taxrate {
')';
# much more CCH oddness in m2m -- this is kludgy
my @tpnums = $self->_expand_cch_taxproductnum($class);
')';
# much more CCH oddness in m2m -- this is kludgy
my @tpnums = $self->_expand_cch_taxproductnum($class);
- $extra_sql .= ' AND ('.
- join(' OR ', map{ "taxproductnum = $_" } @tpnums ).
- ')'
- if @tpnums;
+ if (scalar(@tpnums)) {
+ $extra_sql .= ' AND ('.
+ join(' OR ', map{ "taxproductnum = $_" } @tpnums ).
+ ')';
+ } else {
+ $extra_sql .= ' AND ( 0 = 1 )';
+ }
my $addl_from = 'LEFT JOIN part_pkg_taxproduct USING ( taxproductnum )';
my $order_by = 'ORDER BY taxclassnum, length(geocode) desc, length(taxproduct) desc';
my $addl_from = 'LEFT JOIN part_pkg_taxproduct USING ( taxproductnum )';
my $order_by = 'ORDER BY taxclassnum, length(geocode) desc, length(taxproduct) desc';