diff options
author | ivan <ivan> | 2003-09-25 11:17:06 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-09-25 11:17:06 +0000 |
commit | 694627660388e33e0bab01a5571e660c930cb140 (patch) | |
tree | 306d1dd6bc9fb7c87fc16610ceb52ab2fd1ccfa3 /FS/FS/cust_main_county.pm | |
parent | d6436c7251a94c9597c7b2195d63bd7c86f956e9 (diff) |
multiple, named taxes for a single region
1.4 backport auto-adjusts based on schema
Diffstat (limited to 'FS/FS/cust_main_county.pm')
-rw-r--r-- | FS/FS/cust_main_county.pm | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/FS/FS/cust_main_county.pm b/FS/FS/cust_main_county.pm index f631d8cae..76c982ae8 100644 --- a/FS/FS/cust_main_county.pm +++ b/FS/FS/cust_main_county.pm @@ -63,6 +63,10 @@ currently supported: =item taxname - if defined, printed on invoices instead of "Tax" +=item setuptax - if 'Y', this tax does not apply to setup fees + +=item recurtax - if 'Y', this tax does not apply to recurring fees + =back =head1 METHODS @@ -113,10 +117,38 @@ sub check { || $self->ut_textn('taxclass') # ... || $self->ut_money('exempt_amount') || $self->ut_textn('taxname') + || $self->ut_enum('setuptax', [ '', 'Y' ] ) + || $self->ut_enum('recurtax', [ '', 'Y' ] ) || $self->SUPER::check ; +} + +sub taxname { + my $self = shift; + if ( $self->dbdef_table->column('taxname') ) { + return $self->setfield('taxname', $_[0]) if @_; + return $self->getfield('taxname'); + } + return ''; +} + +sub setuptax { + my $self = shift; + if ( $self->dbdef_table->column('setuptax') ) { + return $self->setfield('setuptax', $_[0]) if @_; + return $self->getfield('setuptax'); + } + return ''; +} +sub recurtax { + my $self = shift; + if ( $self->dbdef_table->column('recurtax') ) { + return $self->setfield('recurtax', $_[0]) if @_; + return $self->getfield('recurtax'); + } + return ''; } =back |