X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2Fbin%2Ffreeside-tax-district-update;h=af43130d50be55eca5ed070fb5b1fa16fa06473b;hb=8568f687b70154d27c32fe16b0d018420807ded1;hp=e32bc9df5ab2c124d8767b9809d143814c8d73e0;hpb=5e76ae4e7a11bd28478ed68eef8124fb7ff0767c;p=freeside.git 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;