X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg.pm;h=d718b05fd8ed2226bb9c3a82bb188d85b588b979;hb=c0e8da2f1e89729efa1032241e4239765a296514;hp=22673234ca7b66281dd8078169313062efa6accf;hpb=d7ca7fe2132e626d6f4e65905f7592ce1789e39c;p=freeside.git diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 22673234c..d718b05fd 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -3,11 +3,12 @@ package FS::cust_bill_pkg; use strict; use vars qw( @ISA ); use FS::Record qw( qsearch qsearchs dbdef dbh ); +use FS::cust_main_Mixin; use FS::cust_pkg; use FS::cust_bill; use FS::cust_bill_pkg_detail; -@ISA = qw( FS::Record ); +@ISA = qw( FS::cust_main_Mixin FS::Record ); =head1 NAME @@ -204,6 +205,33 @@ sub details { #qsearch ( 'cust_bill_pkg_detail', { 'lineitemnum' => $self->lineitemnum }); } +=item desc + +Returns a description for this line item. For typical line items, this is the +I field of the corresponding B object (see L). +For one-shot line items and named taxes, it is the I field of this +line item, and for generic taxes, simply returns "Tax". + +=cut + +sub desc { + my $self = shift; + + if ( $self->pkgnum > 0 ) { + $self->cust_pkg->part_pkg->pkg; + } else { + $self->itemdesc || 'Tax'; + } +} + +=back + +=head1 CLASS METHODS + +=over 4 + +=item + =back =head1 BUGS