diff options
author | ivan <ivan> | 2009-10-22 05:32:31 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-10-22 05:32:31 +0000 |
commit | 3d9e77688a45840e3185fe0570eb56ed914f6d23 (patch) | |
tree | 1135b279377942e2d0f1645fcf6c21781591b0e6 /FS | |
parent | 9f775eac8a4d3d308313cd22ae094d98fe9edf3f (diff) |
fix incompatibility w/invoice_sections vs. cust_bill_pkg.pkgnum -1 "virtual line item" (rare)
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_bill_pkg_display.pm | 7 |
1 files changed, 5 insertions, 2 deletions
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; } |