diff options
author | Mark Wells <mark@freeside.biz> | 2015-03-17 16:09:20 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-03-17 16:09:20 -0700 |
commit | ac659c649a8a59398e4dc76c0e25a71a055dc29c (patch) | |
tree | 69e44e37bc4033789290a52aa98a74733ab0984a /FS/FS/cust_bill_pkg.pm | |
parent | 1afc4addeb73d8b87d6d840a450a396551cf614b (diff) |
correctly void invoices with fees, #32862
Diffstat (limited to 'FS/FS/cust_bill_pkg.pm')
-rw-r--r-- | FS/FS/cust_bill_pkg.pm | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 298e234ec..0e333ae5d 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -26,6 +26,7 @@ use FS::cust_bill_pkg_discount_void; use FS::cust_bill_pkg_tax_location_void; use FS::cust_bill_pkg_tax_rate_location_void; use FS::cust_tax_exempt_pkg_void; +use FS::cust_bill_pkg_fee_void; use FS::part_fee; use FS::Cursor; @@ -363,6 +364,7 @@ sub void { cust_bill_pkg_tax_location cust_bill_pkg_tax_rate_location cust_tax_exempt_pkg + cust_bill_pkg_fee )) { foreach my $linked ( qsearch($table, { billpkgnum=>$self->billpkgnum }) ) { @@ -422,6 +424,7 @@ sub delete { cust_tax_exempt_pkg cust_bill_pay_pkg cust_credit_bill_pkg + cust_bill_pkg_fee )) { foreach my $linked ( qsearch($table, { billpkgnum=>$self->billpkgnum }) ) { @@ -1153,35 +1156,6 @@ sub tax_location { } } -=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->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; - } -} - -# stubs - -sub part_fee { - my $self = shift; - $self->feepart - ? FS::part_fee->by_key($self->feepart) - : undef; -} - =back =head1 CLASS METHODS |