projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3e5de9e
)
avoid needless location changes when coordinates are null, #22364
author
Mark Wells
<mark@freeside.biz>
Fri, 5 Apr 2013 01:50:00 +0000
(18:50 -0700)
committer
Mark Wells
<mark@freeside.biz>
Fri, 5 Apr 2013 01:50:00 +0000
(18:50 -0700)
FS/FS/cust_location.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_location.pm
b/FS/FS/cust_location.pm
index
355bdb0
..
b12a161
100644
(file)
--- a/
FS/FS/cust_location.pm
+++ b/
FS/FS/cust_location.pm
@@
-121,6
+121,10
@@
point.
sub new_or_existing {
my $class = shift;
my %hash = ref($_[0]) ? %{$_[0]} : @_;
+ # if coords are empty, then it doesn't matter if they're auto or not
+ if ( !$hash{'latitude'} and !$hash{'longitude'} ) {
+ delete $hash{'coord_auto'};
+ }
foreach ( qw(address1 address2 city county state zip country geocode
disabled ) ) {
# empty fields match only empty fields