diff options
author | ivan <ivan> | 2004-12-31 08:31:03 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-12-31 08:31:03 +0000 |
commit | eb0fb11854244a8dcd154ecabc56befc8ff2913a (patch) | |
tree | ad0fbcb49bc21fb456b17d28b91010862b2ee30d | |
parent | 0dc0e05d24f7a2e95fbfad1936ab43a446d77701 (diff) |
add ignore_unrateable flag to voip price plan
-rw-r--r-- | FS/FS/part_pkg/voip_sqlradacct.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/FS/FS/part_pkg/voip_sqlradacct.pm b/FS/FS/part_pkg/voip_sqlradacct.pm index 608608f65..7364fadbd 100644 --- a/FS/FS/part_pkg/voip_sqlradacct.pm +++ b/FS/FS/part_pkg/voip_sqlradacct.pm @@ -30,7 +30,7 @@ $DEBUG = 0; 'type' => 'checkbox', }, }, - 'fieldorder' => [qw( setup_fee recur_flat ratenum )], + 'fieldorder' => [qw( setup_fee recur_flat ratenum ignore_unrateable )], 'weight' => 40, ); @@ -103,8 +103,14 @@ sub calc_recur { 'countrycode' => $countrycode, 'npa' => '', }); - die "Can't find rate for call to countrycode $countrycode number $dest\n" - unless $rate_prefix; + + unless ( $rate_prefix ) { + if ( $self->option('ignore_unrateable') ) { + next; + } else { + die "Can't find rate for call to +$countrycode $dest\n" + } + } my $regionnum = $rate_prefix->regionnum; |