1 <% include( 'elements/browse.html',
2 'title' => 'Tiering plans',
3 'name_singular' => 'tiering plan',
4 'menubar' => [ 'Add a new tier plan' =>
5 $p.'edit/rate_tier.html',
7 'query' => { 'table' => 'rate_tier', },
8 'count_query' => 'SELECT COUNT(*) FROM rate_tier',
9 'header' => [ 'Plan', 'Tiers', ],
10 'fields' => [ 'tiername',
13 'links' => [ $link, ],
15 #'disabled_statuspos' => 1,
21 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
23 my $conf = new FS::Conf;
24 my $money_char = $conf->config('money_char') || '$';
26 my $link = [ "${p}edit/rate_tier.html?", 'tiernum' ];
28 my $details_sub = sub {
29 my $rate_tier = shift;
31 [ [ { 'data' => 'Minimum quantity',
34 { 'data' => 'Charge per minute/call',
38 map { my $rate_tier_detail = $_;
40 { 'data' => $rate_tier_detail->min_quan,
43 { 'data' => $money_char. $rate_tier_detail->min_charge,
48 $rate_tier->rate_tier_detail