summaryrefslogtreecommitdiff
path: root/httemplate/edit/usage_class.html
diff options
context:
space:
mode:
authorjeff <jeff>2009-11-20 17:39:40 +0000
committerjeff <jeff>2009-11-20 17:39:40 +0000
commitc1d9ee594c7a950e44c0bc6d7e4e25b3d62b9f7b (patch)
treecc87c769ccd6830e6289135a3f15b5e824ca985f /httemplate/edit/usage_class.html
parent9229bcb6a2a0ef85af50bfa243bba8fdc85eba6d (diff)
invoice formatting: add sections for usage, add sections per svc_phone, add folding like line items into one #6592
Diffstat (limited to 'httemplate/edit/usage_class.html')
-rw-r--r--httemplate/edit/usage_class.html23
1 files changed, 20 insertions, 3 deletions
diff --git a/httemplate/edit/usage_class.html b/httemplate/edit/usage_class.html
index ef4b1fff4..be01d2e67 100644
--- a/httemplate/edit/usage_class.html
+++ b/httemplate/edit/usage_class.html
@@ -3,14 +3,26 @@
'table' => 'usage_class',
'fields' => [
'classname',
- { field=>'disabled',
- type=>'checkbox',
- value=>'Y',
+ 'weight',
+ { field => 'format',
+ type => $useformat ? 'select' : 'hidden',
+ ( $useformat
+ ? ( 'options' => [ keys %labels ],
+ 'labels' => \%labels,
+ )
+ : ()
+ ),
+ },
+ { field => 'disabled',
+ type => 'checkbox',
+ value => 'Y',
},
],
'labels' => {
'classnum' => 'Class number',
'classname' => 'Class name',
+ 'weight' => 'Weight',
+ 'format' => 'Format',
'disabled' => 'Disable class',
},
'viewall_dir' => 'browse',
@@ -22,4 +34,9 @@
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();
+
</%init>