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 'html_init' => $html_init,
9 'name' => 'rate plans',
10 'query' => { 'table' => 'rate',
12 'extra_sql' => 'ORDER BY ratenum',
14 'count_query' => $count_query,
15 'header' => [ '#', 'Rate plan', 'Rates' ],
16 'fields' => [ 'ratenum', 'ratename', $rates_sub ],
17 'links' => [ $link, $link, '' ],
22 my $all_countrycodes = join("\n", map qq(<OPTION VALUE="$_">$_),
23 FS::rate_prefix->all_countrycodes
28 my $ratenum = $rate->ratenum;
30 qq( <FORM METHOD="GET" ACTION="${p}browse/rate_detail.html">
31 <INPUT TYPE="hidden" NAME="ratenum" VALUE="$ratenum">
32 <SELECT NAME="countrycode" onChange="this.form.submit();">
33 <OPTION SELECTED>Select Country Code
34 <OPTION VALUE="">(all)
44 'Rate plans for VoIP and call billing.<BR><BR>'.
45 qq!<A HREF="${p}edit/rate.cgi"><I>Add a rate plan</I></A>!.
46 qq! | <A HREF="${p}misc/copy-rate_detail.html"><I>Copy rates between plans</I></A>!.
49 function rate_areyousure(href) {
50 if (confirm("Are you sure you want to delete this rate plan?") == true)
51 window.location.href = href;
56 my $count_query = 'SELECT COUNT(*) FROM rate';
58 my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
64 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');