projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e0deb48
)
#14049 Add default area code for 7 digit numbers
author
Jeremy Davis
<jeremyd@freeside.biz>
Fri, 5 Sep 2014 15:41:26 +0000
(11:41 -0400)
committer
Jeremy Davis
<jeremyd@freeside.biz>
Fri, 5 Sep 2014 15:41:26 +0000
(11:41 -0400)
FS/FS/part_export/nena2.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/nena2.pm
b/FS/FS/part_export/nena2.pm
index
85576d2
..
50f4b16
100644
(file)
--- 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',
},
'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',
},
'prefix' => { label => 'File name prefix',
type => 'text',
},
@@
-222,7
+225,13
@@
sub data {
$hash{function_code} = $function_code{$action};
$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;
$svc->phonenum =~ /^(\d{3})(\d*)$/;
$hash{npa} = $1;
$hash{calling_number} = $2;