projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
configurable disable_src, domestic_prefix and international_prefix options for voip...
[freeside.git]
/
FS
/
FS
/
rate_region.pm
diff --git
a/FS/FS/rate_region.pm
b/FS/FS/rate_region.pm
index
7945f52
..
65dfd2a
100644
(file)
--- a/
FS/FS/rate_region.pm
+++ b/
FS/FS/rate_region.pm
@@
-281,13
+281,20
@@
sub prefixes_short {
foreach my $rate_prefix ( $self->rate_prefix ) {
if ( $countrycode ne $rate_prefix->countrycode ) {
foreach my $rate_prefix ( $self->rate_prefix ) {
if ( $countrycode ne $rate_prefix->countrycode ) {
- $out =~ s/,$//;
+ $out =~ s/,
$//;
$countrycode = $rate_prefix->countrycode;
$countrycode = $rate_prefix->countrycode;
- $out.= "
$countrycode-
";
+ $out.= "
+$countrycode
";
}
}
- $out .= $rate_prefix->npa. ',';
+ my $npa = $rate_prefix->npa;
+ if ( $countrycode eq '1' ) {
+ $out .= '('. substr( $npa, 0, 3 ). ')';
+ $out .= ' '. substr( $npa, 3 ) if length($npa) > 3;
+ } else {
+ $out .= $rate_prefix->npa;
+ }
+ $out .= ', ';
}
}
- $out =~ s/,$//;
+ $out =~ s/,
$//;
$out;
}
$out;
}