[freeside-commits] branch master updated. 03e71483c54ec32d701d6726ec0f5b6b8aa48b02

Jeremy Davis jeremyd at 420.am
Fri Sep 5 08:43:07 PDT 2014


The branch, master has been updated
       via  03e71483c54ec32d701d6726ec0f5b6b8aa48b02 (commit)
      from  e0deb48e8e53b5c24896a8f136e0a92d0c48b55a (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 03e71483c54ec32d701d6726ec0f5b6b8aa48b02
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Fri Sep 5 11:41:26 2014 -0400

    #14049 Add default area code for 7 digit numbers

diff --git a/FS/FS/part_export/nena2.pm b/FS/FS/part_export/nena2.pm
index 85576d2..50f4b16 100644
--- a/FS/FS/part_export/nena2.pm
+++ b/FS/FS/part_export/nena2.pm
@@ -23,6 +23,9 @@ tie %options, 'Tie::IxHash', (
   'customer_code'   => {  label => 'Customer code',
                           type  => 'text',
                        },
+  'area_code'       => {  label => 'Default area code for 7 digit numbers',
+                          type  => 'text',
+                       },
   'prefix'          => {  label => 'File name prefix',
                           type  => 'text',
                        },
@@ -222,7 +225,13 @@ sub data {
 
   $hash{function_code} = $function_code{$action};
 
-  # phone number 
+  # Add default area code if phonenum is 7 digits
+  if ($self->option('area_code') =~ /^\d{3}/ && $svc->phonenum =~ /^\d{7}/ ){
+  $svc->phonenum = $self->option('area_code'). $svc->phonenum
+  }
+ 
+  # phone number
+  
   $svc->phonenum =~ /^(\d{3})(\d*)$/;
   $hash{npa} = $1;
   $hash{calling_number} = $2;

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

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




More information about the freeside-commits mailing list