X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpkg_class.html;h=b4423f3a9ded14aa0a6894c963c358b1a89b67c9;hb=ac07dfa491181046e8dd2881d6093da9e8d3616f;hp=97b0621ae58fefcdecfba44e1364666039115aab;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/httemplate/browse/pkg_class.html b/httemplate/browse/pkg_class.html index 97b0621ae..b4423f3a9 100644 --- a/httemplate/browse/pkg_class.html +++ b/httemplate/browse/pkg_class.html @@ -5,6 +5,7 @@ 'disableable' => 1, 'disabled_statuspos' => 2, 'query' => { 'table' => 'pkg_class', + 'addl_from' => ' LEFT JOIN pkg_category USING (categorynum)', 'hashref' => {}, 'order_by' => 'ORDER BY classnum', }, @@ -19,6 +20,10 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +local($FS::Record::qsearch_qualify_columns) = 1; + +my $conf = new FS::Conf; + my $html_init = 'Package classes define groups of packages, for taxation, ordering '. 'convenience and reporting.

'. @@ -32,6 +37,12 @@ my $header = [ '#', 'Class' ]; my $fields = [ 'classnum', 'classname' ]; my $links = [ $link, $link ]; +if($conf->exists('cust_main-require_censustract')) { + push @{$fields}, 'fcc_ds0s'; + push @{$header}, 'FCC form 477 voice-grade equivalents'; + push @{$links}, ''; +} + my $cat_query = 'SELECT COUNT(*) FROM pkg_class where categorynum IS NOT NULL'; my $sth = dbh->prepare($cat_query) or die "Error preparing $cat_query: ". dbh->errstr; @@ -40,7 +51,7 @@ $sth->execute if ($sth->fetchrow_arrayref->[0]) { push @$header, 'Category'; push @$fields, 'categoryname'; - push @$links, $link; + push @$links, [ $p.'edit/pkg_category.html?', 'categorynum' ] }