[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 5a07f45117de9b3995a0a3e4ed68c3b42f181550

Ivan ivan at 420.am
Sun Apr 15 17:49:41 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  5a07f45117de9b3995a0a3e4ed68c3b42f181550 (commit)
      from  5f2f706faad794d87d930c64db8eb641fe61990d (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 5a07f45117de9b3995a0a3e4ed68c3b42f181550
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Apr 15 17:49:40 2012 -0700

    add an $import global flag to cust_location so we can avoid geocoding on batch import, RT#16400

diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm
index f863b10..a5250ec 100644
--- a/FS/FS/cust_location.pm
+++ b/FS/FS/cust_location.pm
@@ -1,7 +1,8 @@
 package FS::cust_location;
+use base qw( FS::geocode_Mixin FS::Record );
 
 use strict;
-use base qw( FS::geocode_Mixin FS::Record );
+use vars qw( $import );
 use Locale::Country;
 use FS::UID qw( dbh );
 use FS::Record qw( qsearch ); #qsearchs );
@@ -10,6 +11,8 @@ use FS::prospect_main;
 use FS::cust_main;
 use FS::cust_main_county;
 
+$import = 0;
+
 =head1 NAME
 
 FS::cust_location - Object methods for cust_location records
@@ -195,7 +198,7 @@ sub check {
   return $error if $error;
 
   $self->set_coord
-    unless $self->latitude && $self->longitude;
+    unless $import || ($self->latitude && $self->longitude);
 
   return "No prospect or customer!" unless $self->prospectnum || $self->custnum;
   return "Prospect and customer!"       if $self->prospectnum && $self->custnum;

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

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




More information about the freeside-commits mailing list