projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FCKeditor 2.6.6
[freeside.git]
/
httemplate
/
browse
/
rate.cgi
diff --git
a/httemplate/browse/rate.cgi
b/httemplate/browse/rate.cgi
index
b20c45c
..
02d670f
100644
(file)
--- a/
httemplate/browse/rate.cgi
+++ b/
httemplate/browse/rate.cgi
@@
-17,12
+17,8
@@
%>
<%once>
%>
<%once>
-my $sth = dbh->prepare("SELECT DISTINCT(countrycode) FROM rate_prefix")
- or die dbh->errstr;
-$sth->execute or die $sth->errstr;
-my @all_countrycodes = map $_->[0], @{ $sth->fetchall_arrayref };
my $all_countrycodes = join("\n", map qq(<OPTION VALUE="$_">$_),
my $all_countrycodes = join("\n", map qq(<OPTION VALUE="$_">$_),
-
@
all_countrycodes
+
FS::rate_prefix->
all_countrycodes
);
my $rates_sub = sub {
);
my $rates_sub = sub {
@@
-42,15
+38,10
@@
my $rates_sub = sub {
};
};
-</%once>
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-
my $html_init =
'Rate plans for VoIP and call billing.<BR><BR>'.
qq!<A HREF="${p}edit/rate.cgi"><I>Add a rate plan</I></A>!.
my $html_init =
'Rate plans for VoIP and call billing.<BR><BR>'.
qq!<A HREF="${p}edit/rate.cgi"><I>Add a rate plan</I></A>!.
+ qq! | <A HREF="${p}misc/copy-rate_detail.html"><I>Copy rates between plans</I></A>!.
'<BR><BR>
<SCRIPT>
function rate_areyousure(href) {
'<BR><BR>
<SCRIPT>
function rate_areyousure(href) {
@@
-64,4
+55,10
@@
my $count_query = 'SELECT COUNT(*) FROM rate';
my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
+</%once>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
</%init>
</%init>