[freeside-commits] branch master updated. 9d97b3c2da538eb34c2ec609dd638241fd04d2a8

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


The branch, master has been updated
       via  9d97b3c2da538eb34c2ec609dd638241fd04d2a8 (commit)
      from  d09facc6cc8c60cc3e82c656c827a25a6995b3eb (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 9d97b3c2da538eb34c2ec609dd638241fd04d2a8
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Apr 15 17:49:39 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