X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Frate_region.cgi;h=cae30030a2daa70ede28d5c28da581a101b54913;hp=f24b9d6ef6165fb5f613fb4ba748dd01f5ae98db;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hpb=ef0d8db38d1ee28a65a7ecdc6e11c7a82c0a741b diff --git a/httemplate/edit/rate_region.cgi b/httemplate/edit/rate_region.cgi index f24b9d6ef..cae30030a 100644 --- a/httemplate/edit/rate_region.cgi +++ b/httemplate/edit/rate_region.cgi @@ -35,102 +35,34 @@ -%# rate plan info - -
- -<% include('/elements/table-grid.html') %> -% my $bgcolor1 = '#eeeeee'; -% my $bgcolor2 = '#ffffff'; -% my $bgcolor = ''; - - - - Rate plan - - - Included
minutes/calls
- - - Charge per
minute/call
- - - Granularity - - - Usage class - - - -% foreach my $rate ( qsearch('rate', {}) ) { -% -% my $n = $rate->ratenum; -% my $rate_detail = $rate->dest_detail($rate_region) -% || new FS::rate_region { 'min_included' => 0, -% 'min_charge' => 0, -% 'sec_granularity' => '60' -% }; -% -% if ( $bgcolor eq $bgcolor1 ) { -% $bgcolor = $bgcolor2; -% } else { -% $bgcolor = $bgcolor1; -% } - - - - - <% $rate->ratename %> - - - - min_included |h %>"> - - - - $min_charge ) %>"> - - - - - - - - <% include( '/elements/select-table.html', - 'element_name' => "classnum$n", - 'table' => 'usage_class', - 'name_col' => 'classname', - 'empty_label' => '(default)', - 'hashref' => { disabled => '' }, - 'curr_value' => ( $cgi->param("classnum$n") || - $rate_detail->classnum ), - ) - %> - - - - -% } - - - -

"> - +%# rate plan info, if the region has been created yet + +% if($rate_region->regionnum) { +
+
+Rates in this region +<% include('/edit/elements/rate_detail.html', + 'regionnum' => $rate_region->regionnum, +) %> +% } <% include('/elements/footer.html') %> +<%once> +tie my %conn_secs, 'Tie::IxHash', FS::rate_detail::conn_secs(); + + <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +my $conf = new FS::Conf; +my $money_char = $conf->config('money_char') || '$'; + my $rate_region; if ( $cgi->param('error') ) { $rate_region = new FS::rate_region ( {