[freeside-commits] branch FREESIDE_3_BRANCH updated. 26e8adc999712c58cec4f4c3429880f020152731

Mark Wells mark at 420.am
Thu Nov 17 00:59:58 PST 2016


The branch, FREESIDE_3_BRANCH has been updated
       via  26e8adc999712c58cec4f4c3429880f020152731 (commit)
      from  096d9a396290f30f542f687867499f5cd6e7243c (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 26e8adc999712c58cec4f4c3429880f020152731
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Nov 17 00:54:04 2016 -0800

    skip tax district update on disabled locations

diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm
index 67a5e3e..d209a59 100644
--- a/FS/FS/cust_location.pm
+++ b/FS/FS/cust_location.pm
@@ -915,7 +915,7 @@ sub _upgrade_data {
     next if $field eq 'disabled';
     foreach my $location (qsearch({
       table => 'cust_location',
-      extra_sql => " WHERE $field LIKE ' %' OR $field LIKE '% '"
+      extra_sql => " WHERE disabled IS NULL AND ($field LIKE ' %' OR $field LIKE '% ')"
     })) {
       my $error = $location->replace;
       die "$error (fixing whitespace in $field, locationnum ".$location->locationnum.')'
diff --git a/FS/FS/geocode_Mixin.pm b/FS/FS/geocode_Mixin.pm
index ef16e74..b999be0 100644
--- a/FS/FS/geocode_Mixin.pm
+++ b/FS/FS/geocode_Mixin.pm
@@ -265,6 +265,7 @@ sub process_district_update {
   my $method = $conf->config('tax_district_method')
     or return; #nothing to do if null
   my $self = $class->by_key($id) or die "object $id not found";
+  return if $self->disabled;
 
   # dies on error, fine
   my $tax_info = get_district({ $self->location_hash }, $method);

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_location.pm |    2 +-
 FS/FS/geocode_Mixin.pm |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list