diff options
author | jeff <jeff> | 2009-11-20 17:33:40 +0000 |
---|---|---|
committer | jeff <jeff> | 2009-11-20 17:33:40 +0000 |
commit | 62bfeae993beb7f98d50d319360f1fece128982b (patch) | |
tree | 6c97d81c0983b672dfeb15aeaf00f8be58cf4dec /httemplate/browse | |
parent | 457cf05ffc31212de613249c95a8ab05aed34f47 (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')
-rw-r--r-- | httemplate/browse/pkg_category.html | 8 | ||||
-rw-r--r-- | httemplate/browse/usage_class.html | 23 |
2 files changed, 24 insertions, 7 deletions
diff --git a/httemplate/browse/pkg_category.html b/httemplate/browse/pkg_category.html index a156c06da..16da23066 100644 --- a/httemplate/browse/pkg_category.html +++ b/httemplate/browse/pkg_category.html @@ -3,15 +3,15 @@ 'html_init' => $html_init, 'name' => 'package categories', 'disableable' => 1, - 'disabled_statuspos' => 2, + 'disabled_statuspos' => 3, 'query' => { 'table' => 'pkg_category', 'hashref' => {}, 'extra_sql' => 'ORDER BY categorynum', }, 'count_query' => $count_query, - 'header' => [ '#', 'Category', 'Weight' ], - 'fields' => [ 'categorynum', 'categoryname', 'weight' ], - 'links' => [ $link, $link, $link ], + 'header' => [ '#', 'Category', 'Weight', 'Condense' ], + 'fields' => [ 'categorynum', 'categoryname', 'weight', 'condense' ], + 'links' => [ $link, $link, $link, $link ], ) %> 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>!; |