X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg.pm;h=ef9c01a32f684c057db8290bad382c5a663354cc;hb=faa92dd0fd0b875886378de7c91c59a4049f1168;hp=a9439217c6a59dd4a6ab6972c58ded9b6a046f86;hpb=30e2dfd524a3f52445cbca6bc2cd1962dce7eb04;p=freeside.git diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index a9439217c..ef9c01a32 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -968,6 +968,31 @@ sub tax_locationnum { } } +sub tax_location { + my $self = shift; + FS::cust_location->by_key($self->tax_locationnum); +} + +=item part_X + +Returns the L or L object that defines this +charge. If called on a tax line, returns nothing. + +=cut + +sub part_X { + my $self = shift; + if ( $self->pkgpart_override ) { + return FS::part_pkg->by_key($self->pkgpart_override); + } elsif ( $self->pkgnum ) { + return $self->cust_pkg->part_pkg; + } elsif ( $self->feepart ) { + return $self->part_fee; + } else { + return; + } +} + =back =head1 CLASS METHODS