freeside/FS/FS rate_region.pm,1.1,1.2
ivan
ivan at pouncequick.420.am
Wed Dec 22 23:29:38 PST 2004
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv19456
Modified Files:
rate_region.pm
Log Message:
better short prefix display
Index: rate_region.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/rate_region.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- rate_region.pm 20 Nov 2004 17:26:53 -0000 1.1
+++ rate_region.pm 23 Dec 2004 07:29:36 -0000 1.2
@@ -281,13 +281,20 @@
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, 3 ) if length($npa) > 3;
+ } else {
+ $out .= $rate_prefix->npa;
+ }
+ $out .= ', ';
}
- $out =~ s/,$//;
+ $out =~ s/, $//;
$out;
}
More information about the freeside-commits
mailing list