X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Frate.cgi;h=183ea8a423da1daaa5d3c7dd7a3ac874714b44a5;hb=3ece1c396f23e04cd659f1085f6eeee8bdfd846f;hp=13717dc1aa34d3dffcdbdcd082ce1ed990a5d12c;hpb=342e2bfbe6aad470ab9dee40640f8ac7d9653003;p=freeside.git diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi index 13717dc1a..183ea8a42 100644 --- a/httemplate/edit/rate.cgi +++ b/httemplate/edit/rate.cgi @@ -5,7 +5,7 @@ <% include('/elements/progress-init.html', 'OneTrueForm', - [ 'rate', 'preserve_rate_detail' ], # 'rate', 'min_', 'sec_' ], + [ 'rate', 'agentnum', 'preserve_rate_detail' ], # 'rate', 'min_', 'sec_' ], 'process/rate.cgi', $p.'browse/rate.cgi', ) @@ -13,9 +13,19 @@
+% } + <% include('/edit/elements/rate_detail.html', - 'ratenum' => $rate->ratenum + 'ratenum' => $rate->ratenum, + 'countrycode' => $countrycode, + 'cdrtypenum' => $cdrtypenum, ) %> % } @@ -39,13 +65,21 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my $rate; -if ( $cgi->keywords ) { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; +if ( $cgi->param('ratenum') ) { + $cgi->param('ratenum') =~ /^(\d+)$/; $rate = qsearchs( 'rate', { 'ratenum' => $1 } ); } else { #adding $rate = new FS::rate {}; } my $action = $rate->ratenum ? 'Edit' : 'Add'; +my $countrycode = ''; +if ( $cgi->param('countrycode') =~ /^(\d+)$/ ) { + $countrycode = $1; +} + +my $cdrtypenum = ''; +if ( $cgi->param('cdrtypenum') =~ /^(\d+)$/ ) { + $cdrtypenum = $1; +} %init>