summaryrefslogtreecommitdiff
path: root/httemplate/browse/part_pkg.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-03-02 23:36:31 -0800
committerIvan Kohler <ivan@freeside.biz>2013-03-02 23:36:31 -0800
commitc6782ab85ea83e0c78d85b8975985aac9d467f9d (patch)
tree1787389347daff9e32be8325ddf1c5e423f73163 /httemplate/browse/part_pkg.cgi
parent854299338fd5d9f231f47202ef1b37c46f1d1d6c (diff)
parent6c063e24b90cd374623e2841045fe4c61bed8143 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/browse/part_pkg.cgi')
-rwxr-xr-xhttemplate/browse/part_pkg.cgi30
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>