X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_tax_exempt_pkg.pm;h=e63b84b303499495f65504c94e91db8503260b46;hb=7f5e32275a5a2674fd1d220cd651b222b9831476;hp=128921b9cf0a1a7941b4557b4141c36a8fc58e5b;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/FS/FS/cust_tax_exempt_pkg.pm b/FS/FS/cust_tax_exempt_pkg.pm index 128921b9c..e63b84b30 100644 --- a/FS/FS/cust_tax_exempt_pkg.pm +++ b/FS/FS/cust_tax_exempt_pkg.pm @@ -6,6 +6,7 @@ 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; @ISA = qw( FS::cust_main_Mixin FS::Record ); @@ -112,6 +113,9 @@ sub check { # || $self->ut_foreign_key('custnum', 'cust_main', 'custnum') || $self->ut_foreign_key('billpkgnum', 'cust_bill_pkg', 'billpkgnum') || $self->ut_foreign_key('taxnum', 'cust_main_county', 'taxnum') + || $self->ut_foreign_keyn('creditbillpkgnum', + 'cust_credit_bill_pkg', + 'creditbillpkgnum') || $self->ut_number('year') #check better || $self->ut_number('month') #check better || $self->ut_money('amount') @@ -119,6 +123,18 @@ sub check { ; } +=item cust_main_county + +Returns the associated tax definition if it still exists in the database. +Otherwise returns false. + +=cut + +sub cust_main_county { + my $self = shift; + qsearchs( 'cust_main_county', { 'taxnum', $self->taxnum } ); +} + =back =head1 BUGS