diff options
author | Mark Wells <mark@freeside.biz> | 2013-02-27 20:46:58 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-02-27 20:46:58 -0800 |
commit | d04c981b5f72ffadabde71af68022059af0d52a5 (patch) | |
tree | bce947e07a54a391d5593f957b504ea2805b5a6e /httemplate/browse/part_pkg.cgi | |
parent | 942431fdcb3803b7ef98b1be8c4dc188e1a4b5aa (diff) |
per-package bundles of voice minutes, #5738
Diffstat (limited to 'httemplate/browse/part_pkg.cgi')
-rwxr-xr-x | httemplate/browse/part_pkg.cgi | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 5dee5b8d1..bb5bc5215 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,5 +1,6 @@ <% include( 'elements/browse.html', 'title' => 'Package Definitions', + 'menubar' => \@menubar, 'html_init' => $html_init, 'html_form' => $html_form, 'html_posttotal' => $html_posttotal, @@ -517,6 +518,8 @@ push @fields, sub { my $part_pkg = shift; + my @part_pkg_usage = sort { $a->priority <=> $b->priority } + $part_pkg->part_pkg_usage; [ (map { @@ -559,7 +562,27 @@ push @fields, ] } $part_pkg->svc_part_pkg_link - ) + ), + ( scalar(@part_pkg_usage) ? + [ { data => 'Usage minutes', + align => 'center', + colspan => 2, + data_style => 'b', + link => $p.'browse/part_pkg_usage.html#pkgpart'. + $part_pkg->pkgpart + } ] + : () + ), + ( map { + [ { data => $_->minutes, + align => 'right' + }, + { data => $_->description, + align => 'left' + }, + ] + } @part_pkg_usage + ), ]; }; @@ -590,4 +613,9 @@ if ( $acl_edit_bulk ) { ) . '</FORM>'; } +my @menubar; +# show this if there are any voip_cdr packages defined +if ( FS::part_pkg->count("plan = 'voip_cdr'") ) { + push @menubar, 'Per-package usage minutes' => $p.'browse/part_pkg_usage.html'; +} </%init> |