[freeside-commits] freeside/FS/FS rate.pm,1.10,1.11
Ivan,,,
ivan at wavetail.420.am
Mon May 10 23:38:29 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6555
Modified Files:
rate.pm
Log Message:
fix ignore_unrateable flag, RT#8149
Index: rate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/rate.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- rate.pm 19 Jan 2009 03:50:47 -0000 1.10
+++ rate.pm 11 May 2010 06:38:26 -0000 1.11
@@ -272,9 +272,12 @@
=item dest_detail REGIONNUM | RATE_REGION_OBJECTD | HASHREF
Returns the rate detail (see L<FS::rate_detail>) for this rate to the
-specificed destination. Destination can be specified as an FS::rate_detail
-object or regionnum (see L<FS::rate_detail>), or as a hashref with two keys:
-I<countrycode> and I<phonenum>.
+specificed destination, or the empty string if no rate can be found for
+the given destination.
+
+Destination can be specified as an FS::rate_detail object or regionnum
+(see L<FS::rate_detail>), or as a hashref with two keys: I<countrycode>
+and I<phonenum>.
=cut
@@ -287,7 +290,7 @@
my $countrycode = $_[0]->{'countrycode'};
my $phonenum = $_[0]->{'phonenum'};
- #find a rate prefix, first look at most specific (4 digits) then 3, etc.,
+ #find a rate prefix, first look at most specific, then fewer digits,
# finally trying the country code only
my $rate_prefix = '';
for my $len ( reverse(1..10) ) {
@@ -302,10 +305,7 @@
'npa' => '',
});
- #
- #die "Can't find rate for call $to_or_from +$countrycode $number\n"
- die "Can't find rate for +$countrycode $phonenum\n"
- unless $rate_prefix;
+ return '' unless $rate_prefix;
$regionnum = $rate_prefix->regionnum;
More information about the freeside-commits
mailing list