1 <% include( 'elements/browse.html',
2 'title' => 'Inventory Classes',
3 'name' => 'inventory classes',
5 'query' => { 'table' => 'inventory_class', },
6 'count_query' => 'SELECT COUNT(*) FROM inventory_class',
7 'header' => [ '#', 'Inventory class', 'Inventory' ],
8 'fields' => [ 'classnum',
10 FS::inventory_class->countcell_factory(
22 my $curuser = $FS::CurrentUser::CurrentUser;
25 unless $curuser->access_right('Edit inventory')
26 || $curuser->access_right('Edit global inventory')
27 || $curuser->access_right('Configuration');
29 my $menubar = $curuser->access_right('Configuration')
30 ? [ 'Add a new inventory class' =>
31 $p.'edit/inventory_class.html',
35 my $link = $curuser->access_right('Configuration')
36 ? [ "${p}edit/inventory_class.html?", 'classnum' ]