summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2009-01-19 03:50:47 +0000
committerivan <ivan>2009-01-19 03:50:47 +0000
commitf32d703bd7bd47236487fb4a05e3d5efd3fb2ec0 (patch)
treebd990570884348cc78322a0ecc7e27eed1727b8b /FS
parent389d926e17989db22affd78a4b0c6820fa152c9e (diff)
10 digit prefix matching, RT#4403
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Schema.pm10
-rw-r--r--FS/FS/rate.pm2
2 files changed, 6 insertions, 6 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 2cdf41c8b..d32f72f23 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -1787,11 +1787,11 @@ sub tables_hashref {
'rate_prefix' => {
'columns' => [
- 'prefixnum', 'serial', '', '', '', '',
- 'regionnum', 'int', '', '',, '', '',
- 'countrycode', 'varchar', '', 3, '', '',
- 'npa', 'varchar', 'NULL', 6, '', '',
- 'nxx', 'varchar', 'NULL', 3, '', '',
+ 'prefixnum', 'serial', '', '', '', '',
+ 'regionnum', 'int', '', '', '', '',
+ 'countrycode', 'varchar', '', 3, '', '',
+ 'npa', 'varchar', 'NULL', 10, '', '', #actually the whole prefix
+ 'nxx', 'varchar', 'NULL', 3, '', '', #actually not used
],
'primary_key' => 'prefixnum',
'unique' => [],
diff --git a/FS/FS/rate.pm b/FS/FS/rate.pm
index 128581277..6430ff081 100644
--- a/FS/FS/rate.pm
+++ b/FS/FS/rate.pm
@@ -290,7 +290,7 @@ sub dest_detail {
#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) }