[freeside-commits] branch FREESIDE_3_BRANCH updated. d10fe3d48da3f3bdb423efe42d624e9d1013c958

Mark Wells mark at 420.am
Mon Sep 15 15:53:27 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  d10fe3d48da3f3bdb423efe42d624e9d1013c958 (commit)
      from  458aa5523d0bf2ed829b42295ab482768fbae64e (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 d10fe3d48da3f3bdb423efe42d624e9d1013c958
Author: Mark Wells <mark at freeside.biz>
Date:   Mon Sep 15 15:52:54 2014 -0700

    fix address2 in NENA2 export, #14049

diff --git a/FS/FS/part_export/nena2.pm b/FS/FS/part_export/nena2.pm
index fa3597b..4d3f08f 100644
--- a/FS/FS/part_export/nena2.pm
+++ b/FS/FS/part_export/nena2.pm
@@ -169,15 +169,6 @@ my %function_code = (
 );
 
 sub immediate {
-  local $@;
-  eval "use Geo::StreetAddress::US";
-  if ($@) {
-    if ($@ =~ /^Can't locate/) {
-      return "Geo::StreetAddress::US must be installed to use the NENA2 export.";
-    } else {
-      die $@;
-    }
-  }
 
   # validate some things
   my ($self, $action, $svc) = @_;
@@ -209,6 +200,15 @@ sub create_item {
 }
 
 sub data {
+  local $@;
+  eval "use Geo::StreetAddress::US";
+  if ($@) {
+    if ($@ =~ /^Can't locate/) {
+      return "Geo::StreetAddress::US must be installed to use the NENA2 export.";
+    } else {
+      die $@;
+    }
+  }
   # generate the entire record here.  reconciliation of multiple updates to 
   # the same service can be done at process time.
   my $self = shift;
@@ -259,7 +259,6 @@ sub data {
   } else {
     $hash{location} = $cust_location->address2;
   }
-  $hash{location}             = $location_hash->{address2};
 
   # customer name and class
   $hash{customer_name} = $svc->phone_name_or_cust;

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

Summary of changes:
 FS/FS/part_export/nena2.pm |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)




More information about the freeside-commits mailing list