X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Frate.cgi;h=652c1a68cf0b30d1e893ef95da5d3201bdcf8cc5;hb=881215feafc01aeee19864c39f0d98d3d6909e65;hp=75c7143223ea8ca05d13984335017cfcfccbd182;hpb=b4f0a47a6893de5f6b11f32307a0195f43a359fb;p=freeside.git
diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi
index 75c714322..652c1a68c 100644
--- a/httemplate/edit/rate.cgi
+++ b/httemplate/edit/rate.cgi
@@ -13,17 +13,49 @@
+% 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)',
+% ) ) {
+
+% }
+
+<% include('/edit/elements/rate_detail.html',
+ 'ratenum' => $rate->ratenum,
+ 'countrycode' => $countrycode,
+ 'cdrtypenum' => $cdrtypenum,
+) %>
+% }
<% include('/elements/footer.html') %>
@@ -33,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>