X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Frate.pm;h=6430ff0815a4f9e5dce7f237195ccc07a3aca51e;hb=f32d703bd7bd47236487fb4a05e3d5efd3fb2ec0;hp=257278a30dc273640e8dbc2a1e9b0a9dc0c6d3db;hpb=92adead1404db357a11b58f38c2b4403381a2809;p=freeside.git diff --git a/FS/FS/rate.pm b/FS/FS/rate.pm index 257278a30..6430ff081 100644 --- a/FS/FS/rate.pm +++ b/FS/FS/rate.pm @@ -284,13 +284,13 @@ sub dest_detail { my $regionnum; if ( ref($_[0]) eq 'HASH' ) { - my $countrycode = $_->{'countrycode'}; - my $phonenum = $_->{'phonenum'}; + my $countrycode = $_[0]->{'countrycode'}; + my $phonenum = $_[0]->{'phonenum'}; #find a rate prefix, first look at most specific (4 digits) then 3, etc., # finally trying the country code only my $rate_prefix = ''; - for my $len ( reverse(1..6) ) { + for my $len ( reverse(1..10) ) { $rate_prefix = qsearchs('rate_prefix', { 'countrycode' => $countrycode, #'npa' => { op=> 'LIKE', value=> substr($number, 0, $len) }