X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Frate_region.pm;h=0e65223020237ccdda61801775742c76bb335a74;hp=7945f5290fd5016d00a3bf26e826f7001d1c3b0a;hb=90393980e5f2859ee1e186fa461f48f5129e803e;hpb=48ba2845d0119c56971d5b724661aa37e73b49dd diff --git a/FS/FS/rate_region.pm b/FS/FS/rate_region.pm index 7945f5290..0e6522302 100644 --- a/FS/FS/rate_region.pm +++ b/FS/FS/rate_region.pm @@ -281,13 +281,22 @@ sub prefixes_short { foreach my $rate_prefix ( $self->rate_prefix ) { if ( $countrycode ne $rate_prefix->countrycode ) { - $out =~ s/,$//; + $out =~ s/, $//; $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, 0, 3 ); + $out .= ' '. substr( $npa, 3 ) if length($npa) > 3; + } else { + $out .= $rate_prefix->npa; + } + $out .= '-'. $rate_prefix->nxx if $rate_prefix->nxx; + $out .= ', '; } - $out =~ s/,$//; + $out =~ s/, $//; $out; }