X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg_display.pm;h=a864ec114b332648aa50a11b72d26a5b4ab164ca;hb=f9a181e4c2e505df84de16190ee3b75011326f3f;hp=93c6e87d63f49c9e5a8d1b2727499212802c6bfd;hpb=808b89d9c1f34c9c66064da212ab7036b85973a1;p=freeside.git diff --git a/FS/FS/cust_bill_pkg_display.pm b/FS/FS/cust_bill_pkg_display.pm index 93c6e87d6..a864ec114 100644 --- a/FS/FS/cust_bill_pkg_display.pm +++ b/FS/FS/cust_bill_pkg_display.pm @@ -52,7 +52,15 @@ sub section { if ( defined($value) ) { $self->setfield('section', $value); } else { - $self->getfield('section') || $self->cust_bill_pkg->part_pkg->categoryname; + my $section = $self->getfield('section'); + unless ($section) { + my $cust_bill_pkg = $self->cust_bill_pkg; + if ( $cust_bill_pkg->pkgnum > 0 && !$cust_bill_pkg->hidden ) { + my $part_pkg = $cust_bill_pkg->part_pkg; + $section = $part_pkg->categoryname if $part_pkg; + } + } + $section; } }