RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / httemplate / browse / cust_category.html
1 <% include( 'elements/browse.html',
2                  'title'       => 'Customer categories',
3                  'html_init'   => $html_init,
4                  'name'        => 'customer categories',
5                  'disableable' => 1,
6                  'disabled_statuspos' => 2,
7                  'query'       => { 'table'     => 'cust_category',
8                                     'hashref'   => {},
9                                     'order_by' => '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/cust_class.html">Customer classes</A><BR><BR>!.
25   'Customer categories define groups of customer classes.<BR><BR>'.
26   qq!<A HREF="${p}edit/cust_category.html"><I>Add a customer category</I></A><BR><BR>!;
27
28 my $count_query = 'SELECT COUNT(*) FROM cust_category';
29
30 my $link = [ $p.'edit/cust_category.html?', 'categorynum' ];
31
32 </%init>