X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Frate.cgi;fp=httemplate%2Fedit%2Frate.cgi;h=1abfb0d321bffff13c1a887323ec845c3683e655;hp=13717dc1aa34d3dffcdbdcd082ce1ed990a5d12c;hb=6a10d16ff4e806357abab206254aa38c80a749d3;hpb=ca2b8a8c99585a4619eb657f2c7fca12a7304249 diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi index 13717dc1a..1abfb0d32 100644 --- a/httemplate/edit/rate.cgi +++ b/httemplate/edit/rate.cgi @@ -26,8 +26,24 @@ Rate plan % if($rate->ratenum) {

Rates in this plan +% if ( my $select_cdr_type = include('/elements/select-cdr_type.html', +% 'curr_value' => $cdrtypenum, +% 'onchange' => 'form.submit();', +% 'name_col' => 'cdrtypename', +% 'value_col' => 'cdrtypenum', +% 'empty_label' => '(default)', +% ) ) { +
+ + +Usage type: <% $select_cdr_type %> +
+% } + <% include('/edit/elements/rate_detail.html', - 'ratenum' => $rate->ratenum + 'ratenum' => $rate->ratenum, + 'countrycode' => $countrycode, + 'cdrtypenum' => $cdrtypenum, ) %> % } @@ -39,13 +55,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; +}