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 $sth = dbh->prepare("SELECT DISTINCT(countrycode) FROM rate_prefix")
22 $sth->execute or die $sth->errstr;
23 my @all_countrycodes = map $_->[0], @{ $sth->fetchall_arrayref };
24 my $all_countrycodes = join("\n", map qq(<OPTION VALUE="$_">$_),
30 my $ratenum = $rate->ratenum;
32 qq( <FORM METHOD="GET" ACTION="${p}browse/rate_detail.html">
33 <INPUT TYPE="hidden" NAME="ratenum" VALUE="$ratenum">
34 <SELECT NAME="countrycode" onChange="this.form.submit();">
35 <OPTION SELECTED>Select Country Code
36 <OPTION VALUE="">(all)
49 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
52 'Rate plans for VoIP and call billing.<BR><BR>'.
53 qq!<A HREF="${p}edit/rate.cgi"><I>Add a rate plan</I></A>!.
56 function rate_areyousure(href) {
57 if (confirm("Are you sure you want to delete this rate plan?") == true)
58 window.location.href = href;
63 my $count_query = 'SELECT COUNT(*) FROM rate';
65 my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];