summaryrefslogtreecommitdiff
path: root/FS/bin
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-03-21 15:54:24 -0700
committerMark Wells <mark@freeside.biz>2016-03-21 15:56:03 -0700
commit087a9d9fbaea3a89db3f93f50fef580a388ce573 (patch)
treefaa9899ce282543ca1603059ce037b7caf464a79 /FS/bin
parent8eb2c9d25cdb73d2c97a46244f9d6f5b750b2ab2 (diff)
detect and fix duplicate taxes in Washington sales tax lookup, #40645, #40144
Diffstat (limited to 'FS/bin')
-rw-r--r--FS/bin/freeside-tax-district-update9
1 files changed, 3 insertions, 6 deletions
diff --git a/FS/bin/freeside-tax-district-update b/FS/bin/freeside-tax-district-update
index e32bc9df5..af43130d5 100644
--- a/FS/bin/freeside-tax-district-update
+++ b/FS/bin/freeside-tax-district-update
@@ -23,8 +23,7 @@ my $method = $conf->config('tax_district_method')
my %limit;
%limit = ( district => '' ) if $opt{'n'};
-my @location = qsearch( 'cust_main', \%limit ),
- qsearch( 'cust_location', { disabled => '', %limit } );
+my @location = qsearch( 'cust_location', { disabled => '', %limit } );
# breaking the rules somewhat by modifying cust_location records in place
# instead of doing a proper package change, but we're not changing the
@@ -36,10 +35,8 @@ foreach my $location (@location) {
my $job = FS::queue->new({
job => 'FS::geocode_Mixin::process_district_update'
});
- my $class = ref($location);
- my $id = $class eq 'FS::cust_main' ?
- $location->custnum :
- $location->locationnum;
+ my $class = 'FS::cust_location';
+ my $id = $location->locationnum;
$error = $job->insert($class, $id);
if ( $error ) {
$dbh->rollback;