projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef7a023
)
fix SQL syntax, #25718
author
Mark Wells
<mark@freeside.biz>
Tue, 24 Feb 2015 23:12:13 +0000
(15:12 -0800)
committer
Mark Wells
<mark@freeside.biz>
Tue, 24 Feb 2015 23:12:13 +0000
(15:12 -0800)
FS/FS/part_pkg_taxproduct.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg_taxproduct.pm
b/FS/FS/part_pkg_taxproduct.pm
index
c12a432
..
e86d028
100644
(file)
--- 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';