summaryrefslogtreecommitdiff
path: root/httemplate/browse
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/browse')
-rw-r--r--httemplate/browse/rate_detail.html8
-rw-r--r--httemplate/browse/usage_class.html28
2 files changed, 33 insertions, 3 deletions
diff --git a/httemplate/browse/rate_detail.html b/httemplate/browse/rate_detail.html
index 36e808fec..23bc23ff8 100644
--- a/httemplate/browse/rate_detail.html
+++ b/httemplate/browse/rate_detail.html
@@ -17,6 +17,7 @@
'Included<BR>minutes',
'Charge per<BR>minute',
'Granularity',
+ 'Usage class',
],
'fields' => [
'regionname',
@@ -28,10 +29,11 @@
'&nbsp;<FONT SIZE="-1">(edit)</FONT>';
},
sub { $granularity{ shift->sec_granularity } },
+ 'classname',
],
- 'links' => [ '', '', $edit_link, $edit_link, '' ],
- 'link_onclicks' => [ '', '', $edit_onclick, $edit_onclick, '' ],
- 'align' => 'llrrc',
+ 'links' => [ '', '', $edit_link, $edit_link, '', '' ],
+ 'link_onclicks' => [ '', '', $edit_onclick, $edit_onclick, '', '' ],
+ 'align' => 'llrrcc',
)
%>
<%once>
diff --git a/httemplate/browse/usage_class.html b/httemplate/browse/usage_class.html
new file mode 100644
index 000000000..63fd2c5a2
--- /dev/null
+++ b/httemplate/browse/usage_class.html
@@ -0,0 +1,28 @@
+<% include( 'elements/browse.html',
+ 'title' => 'Usage classes',
+ 'html_init' => $html_init,
+ 'name' => 'usage classes',
+ 'disableable' => 1,
+ 'disabled_statuspos' => 2,
+ 'query' => { 'table' => 'usage_class',
+ 'hashref' => {},
+ 'extra_sql' => 'ORDER BY classnum',
+ },
+ 'count_query' => 'SELECT COUNT(*) FROM usage_class',
+ 'header' => [ '#', 'Class' ],
+ 'fields' => [ 'classnum', 'classname' ],
+ 'links' => [ $link, $link ],
+ )
+%>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $html_init =
+ 'Usage classes define groups of usage for taxation purposes.<BR><BR>'.
+ qq!<A HREF="${p}edit/usage_class.html"><I>Add a usage class</I></A><BR><BR>!;
+
+my $link = [ $p.'edit/usage_class.html?', 'classnum' ];
+
+</%init>