package categories (meta package classes) and grouping invoices by them
[freeside.git] / httemplate / browse / pkg_category.html
1 <% include( 'elements/browse.html',
2                  'title'       => 'Package categories',
3                  'html_init'   => $html_init,
4                  'name'        => 'package categories',
5                  'disableable' => 1,
6                  'disabled_statuspos' => 2,
7                  'query'       => { 'table'     => 'pkg_category',
8                                     'hashref'   => {},
9                                     'extra_sql' => 'ORDER BY categorynum',
10                                   },
11                  'count_query' => $count_query,
12                  'header'      => [ '#', 'Category' ],
13                  'fields'      => [ 'categorynum', 'categoryname' ],
14                  'links'       => [ $link, $link ],
15              )
16 %>
17
18 <%init>
19
20 die "access denied"
21   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
22
23 my $html_init = 
24   qq!<A HREF="${p}browse/pkg_class.html">Package classes</A><BR><BR>!.
25   'Package categories define groups of package classes, for reporting and '.
26   'convenience purposes.<BR><BR>'.
27   qq!<A HREF="${p}edit/pkg_category.html"><I>Add a package category</I></A><BR><BR>!;
28
29 my $count_query = 'SELECT COUNT(*) FROM pkg_category';
30
31 my $link = [ $p.'edit/pkg_category.html?', 'categorynum' ];
32
33 </%init>