X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Frate_region.cgi;h=f77c0dbe770b403d385627fa025f866657be140f;hb=20f38e4c256094bd938b732950e8f93319f851a5;hp=47d1888e004b55feae2a5b157265b8961f7c061a;hpb=c371f6e225cfffa667815a51571203b034e4f75c;p=freeside.git diff --git a/httemplate/edit/rate_region.cgi b/httemplate/edit/rate_region.cgi index 47d1888e0..f77c0dbe7 100644 --- a/httemplate/edit/rate_region.cgi +++ b/httemplate/edit/rate_region.cgi @@ -29,7 +29,7 @@
(comma-separated) - + @@ -49,14 +49,23 @@ Rate plan - Included
minutes
+ Included
minutes/calls
- Charge per
minute
+ Connection
charge
+ + + Connection
charge for
+ + + Charge per
minute/call
Granularity + + Usage class + % foreach my $rate ( qsearch('rate', {}) ) { @@ -81,11 +90,24 @@ - min_included %>"> + min_included |h %>"> + + + + <%$money_char%>conn_charge |h %>"> - $min_charge ) %>"> + min_charge |h %>"> @@ -96,6 +118,19 @@ + + <% 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 ), + ) + %> + + % } @@ -109,12 +144,19 @@ <% 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 ( { @@ -132,12 +174,7 @@ my $action = $rate_region->regionnum ? 'Edit' : 'Add'; my $p1 = popurl(1); -tie my %granularity, 'Tie::IxHash', - '1', => '1 second', - '6' => '6 second', - '30' => '30 second', # '1/2 minute', - '60' => 'minute', -; +tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities(); my @rate_prefix = $rate_region->rate_prefix; my $countrycode = '';