[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 12717f04bfcbbcc563692be08190618b6c056eee

Mark Wells mark at 420.am
Wed Oct 3 17:04:05 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  12717f04bfcbbcc563692be08190618b6c056eee (commit)
      from  1273bc77911d272e91e2cf84a9a92858aed2b24d (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 12717f04bfcbbcc563692be08190618b6c056eee
Author: Mark Wells <mark at freeside.biz>
Date:   Wed Oct 3 17:03:53 2012 -0700

    fix DMA export location fields under 2.3

diff --git a/FS/FS/part_export/dma_radiusmanager.pm b/FS/FS/part_export/dma_radiusmanager.pm
index 6e56c99..97c87f1 100644
--- a/FS/FS/part_export/dma_radiusmanager.pm
+++ b/FS/FS/part_export/dma_radiusmanager.pm
@@ -59,13 +59,12 @@ sub dma_rm_queue {
 
   my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
   my $cust_main = $cust_pkg->cust_main;
-  my $location = $cust_pkg->cust_location;
 
-  my $address = $location->address1;
-  $address .= ' '.$location->address2 if $location->address2;
-  my $country = code2country($location->country);
-  my $lsc = Locale::SubCountry->new($location->country);
-  my $state = $lsc->full_name($location->state) if defined($lsc);
+  my $address = $cust_main->address1;
+  $address .= ' '.$cust_main->address2 if $cust_main->address2;
+  my $country = code2country($cust_main->country);
+  my $lsc = Locale::SubCountry->new($cust_main->country);
+  my $state = $lsc->full_name($cust_main->state) if defined($lsc);
 
   my %params = (
     # for the remote side
@@ -78,13 +77,12 @@ sub dma_rm_queue {
     company     => $cust_main->company,
     phone       => ($cust_main->daytime || $cust_main->night),
     mobile      => $cust_main->mobile,
-    address     => $location->address1, # address2?
-    city        => $location->city,
+    city        => $cust_main->city,
     state       => $state, #full name
-    zip         => $location->zip,
+    zip         => $cust_main->zip,
     country     => $country, #full name
-    gpslat      => $location->latitude,
-    gpslong     => $location->longitude,
+    gpslat      => $cust_main->latitude,
+    gpslong     => $cust_main->longitude,
     comment     => 'svcnum'.$svcnum,
     createdby   => $self->option('manager'),
     owner       => $self->option('manager'),

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

Summary of changes:
 FS/FS/part_export/dma_radiusmanager.pm |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)




More information about the freeside-commits mailing list