1 <% include( 'elements/browse.html',
2 'title' => 'Inventory Classes',
3 'name' => 'inventory classes',
4 'menubar' => [ 'Add a new inventory class' =>
5 $p.'edit/inventory_class.html',
7 'query' => { 'table' => 'inventory_class', },
8 'count_query' => 'SELECT COUNT(*) FROM inventory_class',
9 'header' => [ '#', 'Inventory class', 'Inventory' ],
10 'fields' => [ 'classnum',
13 #my $inventory_class = shift;
17 $p. 'search/inventory_item.html?'.
18 'classnum='. $i_c->classnum;
21 foreach ( keys %inv_action_link ) {
22 my($label, $baseurl, $method) =
23 @{ $inv_action_link{$_} };
24 my $url = $baseurl. $i_c->$method();
28 '<A HREF="'.$url.'">'.
42 'data' => '<B>'. $num{$_}. '</B>',
46 'data' => $labels{$_},
53 { 'data' => $actioncol{$_},
70 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
72 tie my %labels, 'Tie::IxHash',
73 'num_avail' => 'Available', # <FONT SIZE="-1"><A HREF="eventually">(upload batch)</A></FONT>',
74 'num_used' => 'In use', #'Used', #'Allocated',
75 'num_total' => 'Total',
79 'num_avail' => ';avail=1',
80 'num_used' => ';used=1',
84 my %inv_action_link = (
85 'num_avail' => [ 'upload batch',
86 $p.'misc/inventory_item-import.html?classnum=',
91 my $link = [ "${p}edit/inventory_class.html?", 'classnum' ];