1 <% include( 'elements/browse.html',
2 'title' => 'Usage classes',
3 'html_init' => $html_init,
4 'name' => 'usage classes',
6 'disabled_statuspos' => 2,
7 'query' => { 'table' => 'usage_class',
9 'extra_sql' => 'ORDER BY classnum',
11 'count_query' => 'SELECT COUNT(*) FROM usage_class',
15 ( $useformat ? ('Format') : () ),
17 'fields' => [ 'classnum',
20 ( $useformat ? (sub { $labels->{shift->format} } ) : () ),
25 ( $useformat ? ( $link ) : () ),
32 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
34 my $conf = new FS::Conf;
35 my $useformat = $conf->exists('usage_class_as_a_section');
36 my $labels = { &FS::usage_class::summary_formats_labelhash() };
40 'Usage classes define groups of usage for taxation purposes.<BR><BR>'.
41 qq!<A HREF="${p}edit/usage_class.html"><I>Add a usage class</I></A><BR><BR>!;
43 my $link = [ $p.'edit/usage_class.html?', 'classnum' ];