RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / httemplate / browse / vend_main.html
1 <& elements/browse.html,
2      'title'              => 'Vendors',
3      'html_init'          => $html_init,
4      'name'               => 'vendors',
5      'disableable'        => 1,
6      'disabled_statuspos' => 2,
7      'query'              => { 'table'     => 'vend_main',
8                                'hashref'   => {},
9                                'order_by' => 'ORDER BY vendname',
10                              },
11      'count_query'        => $count_query,
12      'header'             => $header,
13      'fields'             => $fields,
14      'links'              => $links,
15 &>
16 <%init>
17
18 die "access denied"
19   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
20
21 my $html_init =
22   #'Vendors.<BR><BR>'.
23   qq!<A HREF="${p}edit/vend_main.html"><I>Add a vendor</I></A><BR><BR>!;
24
25 my $count_query = 'SELECT COUNT(*) FROM vend_main';
26
27 my $link = [ $p.'edit/vend_main.html?', 'vendnum' ];
28 my $clink = [ $p.'edit/vend_class.html?', 'classnum' ];
29
30 my $header = [ '#', 'Vendor', 'Class', ];
31 my $fields = [ 'vendnum', 'vendname',
32                sub { shift->vend_class->classname; }
33              ];
34 my $links  = [ $link, $link, $clink ];
35
36 </%init>