diff options
author | ivan <ivan> | 2010-03-21 23:13:24 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-03-21 23:13:24 +0000 |
commit | bf4223e554e0eb72f45f82392442780e8af4e0f9 (patch) | |
tree | 5896ceb5a364afe44441a18b786387d9683a907c /httemplate/browse | |
parent | 366d237dfb842d9bcbdf43477cb5eabef8fe6686 (diff) |
connection fee for initial N seconds support, RT#7018
Diffstat (limited to 'httemplate/browse')
-rw-r--r-- | httemplate/browse/rate_detail.html | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/httemplate/browse/rate_detail.html b/httemplate/browse/rate_detail.html index 23bc23ff8..3371926b4 100644 --- a/httemplate/browse/rate_detail.html +++ b/httemplate/browse/rate_detail.html @@ -15,6 +15,7 @@ 'Region', 'Prefix(es)', 'Included<BR>minutes', + 'Connection<BR>charge', 'Charge per<BR>minute', 'Granularity', 'Usage class', @@ -22,12 +23,9 @@ 'fields' => [ 'regionname', sub { shift->dest_region->prefixes_short }, - sub { shift->min_included. - ' <FONT SIZE="-1">(edit)</FONT>'; - }, - sub { $money_char. shift->min_charge. - ' <FONT SIZE="-1">(edit)</FONT>'; - }, + sub { shift->min_included. $edit_hint }, + $conn_charge_sub, + sub { $money_char. shift->min_charge. $edit_hint }, sub { $granularity{ shift->sec_granularity } }, 'classname', ], @@ -39,6 +37,7 @@ <%once> tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities(); +tie my %conn_secs, 'Tie::IxHash', FS::rate_detail::conn_secs(); my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; @@ -59,6 +58,15 @@ my $edit_onclick = sub { #default# 'color' => '#333399', ); }; +my $edit_hint = ' <FONT SIZE="-1">(edit)</FONT>'; + +my $conn_charge_sub = sub { + my $rate_detail = shift; + #return '' unless $rate_detail->conn_charge > 0 || $rate_detail->conn_sec; + $money_char. $rate_detail->conn_charge. + ($rate_detail->conn_sec ? ' for '.$conn_secs{$rate_detail->conn_sec} : ''). + $edit_hint; +}; </%once> <%init> |