From: Mark Wells Date: Mon, 16 May 2016 22:02:06 +0000 (-0700) Subject: allow "none" as international prefix when all calls have country codes, #41198 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=b0c05606c571c67e750ccd3c34c35d5e77345aba allow "none" as international prefix when all calls have country codes, #41198 --- diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index 8ccf7af63..b3cceb4aa 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -546,6 +546,9 @@ sub parse_number { my $field = $options{column} || 'dst'; my $intl = $options{international_prefix} || '011'; + # Still, don't break anyone's CDR rating if they have an empty string in + # there. Require an explicit statement that there's no prefix. + $intl = '' if lc($intl) eq 'none'; my $countrycode = ''; my $number = $self->$field(); diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index c1dd522b8..fa2c02f10 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -152,7 +152,7 @@ tie my %accountcode_tollfree_field, 'Tie::IxHash', # 'type' => 'checkbox', # }, - 'international_prefix' => { 'name' => 'Destination prefix for international CDR records', + 'international_prefix' => { 'name' => 'Destination prefix for international CDR records (or "none" for no prefix)', 'default' => '011', },