X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg.pm;h=29257c0cbc040d227cc2f4b97266650a98afee2d;hp=be2ad935fe6981529ad4200e79530b1d39ac0d66;hb=1aa750eba2b9b73b4f09f28b9acd748ee3669bd4;hpb=b03df92e48df653460cb8b6034a06dd1de6f4095 diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index be2ad935f..29257c0cb 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -132,7 +132,7 @@ insert and replace methods. sub check { my $self = shift; - my $error = $self->ut_numbern('pkgpart') + $self->ut_numbern('pkgpart') || $self->ut_text('pkg') || $self->ut_text('comment') || $self->ut_anything('setup') @@ -140,19 +140,11 @@ sub check { || $self->ut_anything('recur') || $self->ut_alphan('plan') || $self->ut_anything('plandata') + || $self->ut_enum('setuptax', [ '', 'Y' ] ) + || $self->ut_enum('recurtax', [ '', 'Y' ] ) + || $self->ut_enum('disabled', [ '', 'Y' ] ) ; - 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); - - $self->disabled =~ /^(Y?)$/ or return "Illegal disabled: ". $self->disabled; - $self->disabled($1); - - ''; } =item pkg_svc @@ -190,7 +182,7 @@ sub svcpart { =head1 VERSION -$Id: part_pkg.pm,v 1.5 2001-12-27 09:26:13 ivan Exp $ +$Id: part_pkg.pm,v 1.6 2002-01-28 06:57:23 ivan Exp $ =head1 BUGS