summaryrefslogtreecommitdiff
path: root/httemplate/browse/usage_class.html
diff options
context:
space:
mode:
authorjeff <jeff>2009-11-20 17:33:40 +0000
committerjeff <jeff>2009-11-20 17:33:40 +0000
commit62bfeae993beb7f98d50d319360f1fece128982b (patch)
tree6c97d81c0983b672dfeb15aeaf00f8be58cf4dec /httemplate/browse/usage_class.html
parent457cf05ffc31212de613249c95a8ab05aed34f47 (diff)
invoice formatting: add sections for usage, add sections per svc_phone, add folding like line items into one #6592
Diffstat (limited to 'httemplate/browse/usage_class.html')
-rw-r--r--httemplate/browse/usage_class.html23
1 files changed, 20 insertions, 3 deletions
diff --git a/httemplate/browse/usage_class.html b/httemplate/browse/usage_class.html
index 63fd2c5a2..75223e025 100644
--- a/httemplate/browse/usage_class.html
+++ b/httemplate/browse/usage_class.html
@@ -9,9 +9,21 @@
'extra_sql' => 'ORDER BY classnum',
},
'count_query' => 'SELECT COUNT(*) FROM usage_class',
- 'header' => [ '#', 'Class' ],
- 'fields' => [ 'classnum', 'classname' ],
- 'links' => [ $link, $link ],
+ 'header' => [ '#',
+ 'Class',
+ 'Weight',
+ ( $useformat ? ('Format') : () ),
+ ],
+ 'fields' => [ 'classnum',
+ 'classname',
+ 'weight',
+ ( $useformat ? (sub { $labels->{shift->format} } ) : () ),
+ ],
+ 'links' => [ $link,
+ $link,
+ $link,
+ ( $useformat ? ( $link ) : () ),
+ ],
)
%>
<%init>
@@ -19,6 +31,11 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $conf = new FS::Conf;
+my $useformat = $conf->exists('usage_class_as_a_section');
+my $labels = { &FS::usage_class::summary_formats_labelhash() };
+
+
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>!;