1 <% include( 'elements/browse.html',
2 'title' => 'Rate plans',
3 'menubar' => [ 'Regions and Prefixes' =>
4 $p.'browse/rate_region.html',
6 $p.'browse/rate_time.html',
8 $p.'edit/cdr_type.cgi',
10 'html_init' => $html_init,
11 'name' => 'rate plans',
12 'query' => { 'table' => 'rate',
14 'order_by' => 'ORDER BY ratenum',
16 'count_query' => $count_query,
17 'header' => [ '#', 'Rate plan', 'Rates' ],
18 'fields' => [ 'ratenum', 'ratename', $rates_sub ],
19 'links' => [ $link, $link, '' ],
20 'really_disable_download' => 1
25 my $all_countrycodes = join("\n", map qq(<OPTION VALUE="$_">$_),
26 FS::rate_prefix->all_countrycodes
31 my $ratenum = $rate->ratenum;
33 qq( <FORM METHOD="GET" ACTION="${p}edit/rate.cgi">
34 <INPUT TYPE="hidden" NAME="ratenum" VALUE="$ratenum">
35 <SELECT NAME="countrycode" onChange="this.form.submit();">
36 <OPTION SELECTED>Select Country Code
37 <OPTION VALUE="">(all)
47 'Rate plans for VoIP and call billing.<BR><BR>'.
48 qq!<A HREF="${p}edit/rate.cgi"><I>Add a rate plan</I></A>!.
49 qq! | <A HREF="${p}misc/copy-rate_detail.html"><I>Copy rates between plans</I></A>!.
52 function rate_areyousure(href) {
53 if (confirm("Are you sure you want to delete this rate plan?") == true)
54 window.location.href = href;
59 my $count_query = 'SELECT COUNT(*) FROM rate';
61 my $link = [ $p.'edit/rate.cgi?ratenum=', 'ratenum' ];
67 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');