X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg.pm;h=ceb2a01280f1dd05dd2fe5f47da2d2abe806007f;hb=4e5a0655072be725acf00394186b93c96bba17ee;hp=d262a04e071557b8347e2067417a6d1d460021d4;hpb=75f1f7889d2a653c61adb689c029e8c8a7544565;p=freeside.git diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index d262a04e0..ceb2a0128 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -46,11 +46,19 @@ inherits from FS::Record. The following fields are currently supported: =item comment - Text name of this billing item definition (non-customer-viewable) -=item setup - Setup fee +=item setup - Setup fee expression =item freq - Frequency of recurring fee -=item recur - Recurring fee +=item recur - Recurring fee expression + +=item setuptax - Setup fee tax exempt flag, empty or `Y' + +=item recurtax - Recurring fee tax exempt flag, empty or `Y' + +=item plan - Price plan + +=item plandata - Price plan data =back @@ -122,13 +130,24 @@ insert and replace methods. sub check { my $self = shift; - $self->ut_numbern('pkgpart') + my $error = $self->ut_numbern('pkgpart') || $self->ut_text('pkg') || $self->ut_text('comment') || $self->ut_anything('setup') || $self->ut_number('freq') || $self->ut_anything('recur') + || $self->ut_alphan('plan') + || $self->ut_anything('plandata') ; + return $error if $error; + + $self->setuptax =~ /^(Y?)$/ or return "Illegal setuptax: ". $self->setuptax; + $self->setuptax($1); + + $self->recurtax =~ /^(Y?)$/ or return "Illegal recrutax: ". $self->recurtax; + $self->recurtax($1); + + ''; } =item pkg_svc @@ -166,7 +185,7 @@ sub svcpart { =head1 VERSION -$Id: part_pkg.pm,v 1.2 1999-08-20 08:27:06 ivan Exp $ +$Id: part_pkg.pm,v 1.4 2001-10-20 12:17:59 ivan Exp $ =head1 BUGS