diff options
author | ivan <ivan> | 2010-10-31 21:23:36 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-10-31 21:23:36 +0000 |
commit | 7726d9797f078c5de3358a78018dca3e4ec5e966 (patch) | |
tree | e1bfd40904e92d75a84d1dfc509239332eac1e71 | |
parent | 5ff1cef039831955bff643d379dd594a6f79284c (diff) |
if there's a geocode override and the address changes, clear it, RT#10376
-rw-r--r-- | FS/FS/cust_main.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 8a043ae14..15bbdc372 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1403,6 +1403,17 @@ sub replace { return "You are not permitted to create complimentary accounts."; } + if ( $old->get('geocode') && $old->get('geocode') eq $self->get('geocode') + && $conf->exists('enable_taxproducts') + ) + { + my $pre = ($conf->exists('tax-ship_address') && $self->ship_zip) + ? 'ship_' : ''; + $self->set('geocode', '') + if $old->get($pre.'zip') ne $self->get($pre.'zip') + && length($self->get($pre.'zip')) >= 10; + } + local($ignore_expired_card) = 1 if $old->payby =~ /^(CARD|DCRD)$/ && $self->payby =~ /^(CARD|DCRD)$/ |