[freeside-commits] branch FREESIDE_3_BRANCH updated. e052dea3e4b83b6d077e91436065d8def68ebeca
Jeremy Davis
jeremyd at 420.am
Fri Sep 5 08:44:30 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via e052dea3e4b83b6d077e91436065d8def68ebeca (commit)
from e3936ba407632934b8c9f91a3b07aaabd3c5e62f (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 e052dea3e4b83b6d077e91436065d8def68ebeca
Author: Jeremy Davis <jeremyd at freeside.biz>
Date: Fri Sep 5 11:44:17 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