summaryrefslogtreecommitdiff
path: root/httemplate/browse/pkg_category.html
diff options
context:
space:
mode:
authorjeff <jeff>2008-06-19 03:18:19 +0000
committerjeff <jeff>2008-06-19 03:18:19 +0000
commitf13afe5e228a220311557e1ca6dacbf847c26baf (patch)
tree9cd6b6e511234d72dfa9e8dd8278a721e5ad03eb /httemplate/browse/pkg_category.html
parent795a85c10d898120a2a6341c4df32fb60b069a64 (diff)
package categories (meta package classes) and grouping invoices by them
Diffstat (limited to 'httemplate/browse/pkg_category.html')
-rw-r--r--httemplate/browse/pkg_category.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/httemplate/browse/pkg_category.html b/httemplate/browse/pkg_category.html
new file mode 100644
index 000000000..20bf1a8df
--- /dev/null
+++ b/httemplate/browse/pkg_category.html
@@ -0,0 +1,33 @@
+<% include( 'elements/browse.html',
+ 'title' => 'Package categories',
+ 'html_init' => $html_init,
+ 'name' => 'package categories',
+ 'disableable' => 1,
+ 'disabled_statuspos' => 2,
+ 'query' => { 'table' => 'pkg_category',
+ 'hashref' => {},
+ 'extra_sql' => 'ORDER BY categorynum',
+ },
+ 'count_query' => $count_query,
+ 'header' => [ '#', 'Category' ],
+ 'fields' => [ 'categorynum', 'categoryname' ],
+ 'links' => [ $link, $link ],
+ )
+%>
+
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $html_init =
+ qq!<A HREF="${p}browse/pkg_class.html">Package classes</A><BR><BR>!.
+ 'Package categories define groups of package classes, for reporting and '.
+ 'convenience purposes.<BR><BR>'.
+ qq!<A HREF="${p}edit/pkg_category.html"><I>Add a package category</I></A><BR><BR>!;
+
+my $count_query = 'SELECT COUNT(*) FROM pkg_category';
+
+my $link = [ $p.'edit/pkg_category.html?', 'categorynum' ];
+
+</%init>