communigate provisioning phase 2: add svc_domain.trailer -> communigate TrailerText...
[freeside.git] / FS / FS / cust_bill_pkg_display.pm
index 93c6e87..e9da18d 100644 (file)
@@ -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 ) {
+        my $part_pkg = $cust_bill_pkg->part_pkg;
+        $section = $part_pkg->categoryname if $part_pkg;
+      }
+    }
+    $section;
   }
 }