book closing schema changes
[freeside.git] / FS / FS / part_pkg.pm
index ceb2a01..29257c0 100644 (file)
@@ -60,6 +60,8 @@ inherits from FS::Record.  The following fields are currently supported:
 
 =item plandata - Price plan data
 
+=item disabled - Disabled flag, empty or `Y'
+
 =back
 
 setup and recur are evaluated as Safe perl expressions.  You can use numbers
@@ -130,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')
@@ -138,16 +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);
 
-  '';
 }
 
 =item pkg_svc
@@ -185,7 +182,7 @@ sub svcpart {
 
 =head1 VERSION
 
-$Id: part_pkg.pm,v 1.4 2001-10-20 12:17:59 ivan Exp $
+$Id: part_pkg.pm,v 1.6 2002-01-28 06:57:23 ivan Exp $
 
 =head1 BUGS