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