[freeside-commits] branch master updated. e1bf0136f69f20fb301c188d9d98e9f3ec051a6a
Mark Wells
mark at 420.am
Thu Jun 5 14:17:26 PDT 2014
The branch, master has been updated
via e1bf0136f69f20fb301c188d9d98e9f3ec051a6a (commit)
from c2f7d8ba623194ad1fae37b231b2e29b33d05674 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e1bf0136f69f20fb301c188d9d98e9f3ec051a6a
Author: Mark Wells <mark at freeside.biz>
Date: Thu Jun 5 14:17:13 2014 -0700
external taxes: avoid failing when the package has taxproductnums but no default taxproductnum, fallout from #25899
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index 0165455..ffbeba2 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -1475,12 +1475,19 @@ sub tax_rates {
$self->part_pkg_taxoverride($class);
if (!@taxclassnums) {
my $part_pkg_taxproduct = $self->taxproduct($class);
+ # If this isn't defined, then the class has no taxproduct designation,
+ # so return no tax rates.
+ return () if !$part_pkg_taxproduct;
+
+ # convert the taxproduct to the tax classes that might apply to it in
+ # $geocode
@taxclassnums = map { $_->taxclassnum }
grep { $_->taxable eq 'Y' } # why do we need this?
$part_pkg_taxproduct->part_pkg_taxrate($geocode);
}
return unless @taxclassnums;
+ # then look up the actual tax_rate entries
warn "Found taxclassnum values of ". join(',', @taxclassnums) ."\n"
if $DEBUG;
my $extra_sql = "AND taxclassnum IN (". join(',', @taxclassnums) . ")";
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg.pm | 7 +++++++
1 file changed, 7 insertions(+)
More information about the freeside-commits
mailing list