diff options
author | Mark Wells <mark@freeside.biz> | 2014-02-24 15:45:44 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2014-02-24 15:45:44 -0800 |
commit | cc3a43f7d4386297a8babebfdd49646f836db127 (patch) | |
tree | e30830dc586eebc311325810f281ebf900600e8a /FS/FS/cust_bill_pkg.pm | |
parent | 04220e7ef18314883ad1cec05c552f13d8d5f7e4 (diff) |
non-package fees, fixes for tax calculation and sales reports, #25899
Diffstat (limited to 'FS/FS/cust_bill_pkg.pm')
-rw-r--r-- | FS/FS/cust_bill_pkg.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index a943921..066ddf1 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<FS::part_pkg> or L<FS::part_fee> object that defines this +charge. If called on a tax line, returns nothing. + +=cut + +sub part_X { + my $self = shift; + if ( $self->override_pkgpart ) { + return FS::part_pkg->by_key($self->override_pkgpart); + } elsif ( $self->pkgnum ) { + return $self->cust_pkg->part_pkg; + } elsif ( $self->feepart ) { + return $self->part_fee; + } else { + return; + } +} + =back =head1 CLASS METHODS |