summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-04-28 13:40:04 -0700
committerMark Wells <mark@freeside.biz>2015-04-28 13:40:48 -0700
commitcad3732387f89248885f4844eec88575e0ce7013 (patch)
treee875ed115d82f519c745584b648275b62ed526ca
parent3c10215fb8f856e966f22ffaba297ae1c335f5d0 (diff)
avoid overwriting secondary taxes during district tax updates, #34668
-rw-r--r--FS/FS/geocode_Mixin.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/geocode_Mixin.pm b/FS/FS/geocode_Mixin.pm
index 57d8ca0e8..611b9e5c1 100644
--- a/FS/FS/geocode_Mixin.pm
+++ b/FS/FS/geocode_Mixin.pm
@@ -236,6 +236,8 @@ sub process_district_update {
my $class = shift;
my $id = shift;
+ local $DEBUG = 1;
+
eval "use FS::Misc::Geo qw(get_district); use FS::Conf; use $class;";
die $@ if $@;
die "$class has no location data" if !$class->can('location_hash');
@@ -255,6 +257,8 @@ sub process_district_update {
my %hash = map { $_ => $tax_info->{$_} }
qw( district city county state country );
+ $hash{'taxname'} = '';
+
my $old = qsearchs('cust_main_county', \%hash);
if ( $old ) {
my $new = new FS::cust_main_county { $old->hash, %$tax_info };