X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg_display.pm;h=e9da18deced0df7038906a6ce0e7a14dbf46a069;hp=cf70cbd8f63d957fb1d876ac842f627a4740e7f1;hb=ad7f49821d40ffd099a45acc32ba91e0e211aede;hpb=947c1f964f1304242f8a6ffabacccf040f1d505e diff --git a/FS/FS/cust_bill_pkg_display.pm b/FS/FS/cust_bill_pkg_display.pm index cf70cbd8f..e9da18dec 100644 --- a/FS/FS/cust_bill_pkg_display.pm +++ b/FS/FS/cust_bill_pkg_display.pm @@ -54,8 +54,11 @@ sub section { } else { my $section = $self->getfield('section'); unless ($section) { - my $part_pkg = $self->cust_bill_pkg->part_pkg; - $section = $part_pkg->categoryname if $part_pkg; + my $cust_bill_pkg = $self->cust_bill_pkg; + if ( $cust_bill_pkg->pkgnum > 0 ) { + my $part_pkg = $cust_bill_pkg->part_pkg; + $section = $part_pkg->categoryname if $part_pkg; + } } $section; }