X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Frate_region.cgi;h=8036f7388b3f3f14884a83adfe6bc3954a207872;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=09d3d2c420ea4037d380db671927a3722daaa6a3;hpb=48ba2845d0119c56971d5b724661aa37e73b49dd;p=freeside.git diff --git a/httemplate/edit/process/rate_region.cgi b/httemplate/edit/process/rate_region.cgi index 09d3d2c42..8036f7388 100755 --- a/httemplate/edit/process/rate_region.cgi +++ b/httemplate/edit/process/rate_region.cgi @@ -1,4 +1,14 @@ -<% +%if ( $error ) { +% $cgi->param('error', $error); +<% $cgi->redirect(popurl(2). "rate_region.cgi?". $cgi->query_string ) %> +%} else { +<% $cgi->redirect(popurl(3). "browse/rate_region.html") %> +%} +<%init> + +my $conf = new FS::Conf; +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my $regionnum = $cgi->param('regionnum'); @@ -14,8 +24,12 @@ my $countrycode = $cgi->param('countrycode'); my @npa = split(/\s*,\s*/, $cgi->param('npa')); $npa[0] = '' unless @npa; my @rate_prefix = map { + #my($npa,$nxx) = split('-', $_); + s/\D//g; new FS::rate_prefix { 'countrycode' => $countrycode, + #'npa' => $npa, + #'nxx' => $nxx, 'npa' => $_, } } @npa; @@ -25,7 +39,7 @@ my @dest_detail = map { new FS::rate_detail { 'ratenum' => $ratenum, map { $_ => $cgi->param("$_$ratenum") } - qw( min_included min_charge sec_granularity ) + qw( min_included conn_charge conn_sec min_charge sec_granularity classnum ) }; } qsearch('rate', {} ); @@ -40,12 +54,4 @@ if ( $regionnum ) { $regionnum = $new->getfield('regionnum'); } -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "rate_region.cgi?". $cgi->query_string ); -} else { - #print $cgi->redirect(popurl(3). "browse/rate_region.cgi"); - print $cgi->redirect(popurl(3). "browse/rate.cgi"); -} - -%> +