[freeside-commits] branch master updated. b57377d091b08fe8874d362d885361cc8380ca69

Mark Wells mark at 420.am
Wed Sep 3 11:51:20 PDT 2014


The branch, master has been updated
       via  b57377d091b08fe8874d362d885361cc8380ca69 (commit)
      from  77aa74141762ca5628b399dadab07bdd63120948 (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 b57377d091b08fe8874d362d885361cc8380ca69
Author: Mark Wells <mark at freeside.biz>
Date:   Wed Sep 3 11:51:07 2014 -0700

    add customer code field, #14049

diff --git a/FS/FS/part_export/nena2.pm b/FS/FS/part_export/nena2.pm
index ad67ba2..85576d2 100644
--- a/FS/FS/part_export/nena2.pm
+++ b/FS/FS/part_export/nena2.pm
@@ -20,6 +20,9 @@ tie %options, 'Tie::IxHash', (
   'company_id'      => {  label => 'NENA company ID',
                           type  => 'text',
                        },
+  'customer_code'   => {  label => 'Customer code',
+                          type  => 'text',
+                       },
   'prefix'          => {  label => 'File name prefix',
                           type  => 'text',
                        },
@@ -215,7 +218,7 @@ sub data {
   my $cust_location = FS::cust_location->by_key($locationnum);
 
   # initialize with empty strings
-  my %hash = map { $_ => '' } $item_format->names;
+  my %hash = map { $_ => '' } @{ $item_format->names };
 
   $hash{function_code} = $function_code{$action};
 
@@ -277,13 +280,11 @@ sub data {
   # so we can't comply.  NENA 3 fixed this...
 
   $hash{company_id} = $self->option('company_id');
+  $hash{customer_code} = $self->option('customer_code') || '';
   $hash{source_id} = $initial_load_hack ? 'C' : ' ';
 
-  @hash{'zip', 'zip_'} = split('-', $cust_location->zip);
-  
-  # $hash{customer_code} is supposed to "uniquely identify a customer" but 
-  # they give us 3 alphanumeric characters.  Not sure how that works.
-
+  @hash{'zip_code', 'zip_4'} = split('-', $cust_location->zip);
+ 
   $hash{x_coordinate} = $cust_location->longitude;
   $hash{y_coordinate} = $cust_location->latitude;
   # $hash{z_coordinate} = $cust_location->altitude; # not implemented, sadly

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

Summary of changes:
 FS/FS/part_export/nena2.pm |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)




More information about the freeside-commits mailing list