diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-09-05 11:45:48 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-09-05 11:45:48 -0700 |
commit | 656a9b83e02e5eb5aea314b23546b156631ac51a (patch) | |
tree | 62d68333cfb14e6b348836fc356b05b539f41b9b /FS | |
parent | f5f6c1b1a622d934b4450e4923f95012c5874098 (diff) | |
parent | f3145308f69d7d3d42af6132439cff26b4fc9008 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/part_export/aradial.pm | 2 | ||||
-rw-r--r-- | FS/FS/part_export/nena2.pm | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/FS/FS/part_export/aradial.pm b/FS/FS/part_export/aradial.pm index f3de614b1..afb17a699 100644 --- a/FS/FS/part_export/aradial.pm +++ b/FS/FS/part_export/aradial.pm @@ -118,7 +118,7 @@ sub request_user_edit { sub request { my $self = shift; my @params = @_; - my $path = '/Admin'; # I think this is always right + my $path = '/ArdWeb/ARDAdminIs.dll'; # I think this is always right my $url = URI->new('http://' . $self->host . $path); warn "$me request: \n".Dumper(\@params)."\n\n" if $DEBUG >= 2; my $response = $self->ua->post($url, \@params); diff --git a/FS/FS/part_export/nena2.pm b/FS/FS/part_export/nena2.pm index 85576d20b..e172a15a9 100644 --- a/FS/FS/part_export/nena2.pm +++ b/FS/FS/part_export/nena2.pm @@ -15,7 +15,7 @@ my %upload_targets; tie %options, 'Tie::IxHash', ( 'company_name' => { label => 'Company name for header record', - type => 'text' + type => 'text', }, 'company_id' => { label => 'NENA company ID', type => 'text', @@ -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; |