X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_tax_exempt_pkg.pm;h=68b7724ec9ef9a0bc14a6da69e5d21960c5503f9;hp=bbabb5b0a34c6c0ab2649fcb960b0a44614365af;hb=ffa18709ee8a4d05e18d2d406cf73afe79e52524;hpb=3185fe4edea62dd3fa9818cf80902e96fe2a2d21 diff --git a/FS/FS/cust_tax_exempt_pkg.pm b/FS/FS/cust_tax_exempt_pkg.pm index bbabb5b0a..68b7724ec 100644 --- a/FS/FS/cust_tax_exempt_pkg.pm +++ b/FS/FS/cust_tax_exempt_pkg.pm @@ -1,19 +1,13 @@ package FS::cust_tax_exempt_pkg; +use base qw( FS::cust_main_Mixin FS::Record ); use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); -use FS::cust_main_Mixin; -use FS::cust_bill_pkg; -use FS::cust_main_county; -use FS::cust_credit_bill_pkg; use FS::UID qw(dbh); +use FS::cust_main_county; use FS::upgrade_journal; # some kind of common ancestor with cust_bill_pkg_tax_location would make sense -@ISA = qw( FS::cust_main_Mixin FS::Record ); - =head1 NAME FS::cust_tax_exempt_pkg - Object methods for cust_tax_exempt_pkg records @@ -68,7 +62,7 @@ may be the setup fee, the recurring fee, or the sum of those. (cust_main.tax = 'Y'). =item exempt_cust_taxname - flag indicating that the customer is exempt -from the tax with this name (see L). =item exempt_setup, exempt_recur: flag indicating that the package's setup or recurring fee is not taxable (part_pkg.setuptax and part_pkg.recurtax). @@ -183,9 +177,14 @@ Otherwise returns false. =cut +# do not remove; this can't be autogenerated + sub cust_main_county { my $self = shift; - qsearchs( 'cust_main_county', { 'taxnum', $self->taxnum } ); + if ( $self->taxtype eq 'FS::cust_main_county' ) { + return FS::cust_main_county->by_key($self->taxnum); + } + ''; } sub _upgrade_data {