X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_svc.pm;h=18760c39a41db59537c0feb9fa1b2977d7197556;hb=002d821bb367e07902c987721737f62f280e03b9;hp=f1e71ada8b2a425ee70e1fcc66f8ae6dffa00cfd;hpb=f5266a4d07d116efd732f433d0f4f3a47b143a7d;p=freeside.git diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index f1e71ada8..18760c39a 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -2,7 +2,7 @@ package FS::part_svc; use strict; use vars qw( @ISA ); -use FS::Record qw( qsearchs fields dbh ); +use FS::Record qw( qsearch qsearchs fields dbh ); use FS::part_svc_column; @ISA = qw(FS::Record); @@ -40,9 +40,7 @@ FS::Record. The following fields are currently supported: =item svcdb - table used for this service. See L, L, and L, among others. -=item I__I - Default or fixed value for I in I. - -=item I__I_flag - defines I__I action: null, `D' for default, or `F' for fixed +=item disabled - Disabled flag, empty or `Y' =back @@ -63,6 +61,7 @@ sub table { 'part_svc'; } Adds this service definition to the database. If there is an error, returns the error, otherwise returns false. + =item I__I - Default or fixed value for I in I. =item I__I_flag - defines I__I action: null, `D' for default, or `F' for fixed @@ -238,6 +237,7 @@ sub check { my @fields = eval { fields( $recref->{svcdb} ) }; #might die return "Unknown svcdb!" unless @fields; +##REPLACED BY part_svc_column # my $svcdb; # foreach $svcdb ( qw( # svc_acct svc_acct_sm svc_domain @@ -262,6 +262,9 @@ sub check { # } # } + $self->disabled =~ /^(Y?)$/ or return "Illegal disabled: ". $self->disabled; + $self->disabled($1); + ''; #no error } @@ -285,11 +288,20 @@ sub part_svc_column { }; } +=item all_part_svc_column + +=cut + +sub all_part_svc_column { + my $self = shift; + qsearch('part_svc_column', { 'svcpart' => $self->svcpart } ); +} + =back =head1 VERSION -$Id: part_svc.pm,v 1.4 2001-09-11 00:08:18 ivan Exp $ +$Id: part_svc.pm,v 1.7 2001-12-27 09:26:13 ivan Exp $ =head1 BUGS @@ -300,9 +312,9 @@ should be fixed. =head1 SEE ALSO -L, L, L, L, -L, L, L, schema.html from the -base documentation. +L, L, L, +L, L, L, L, +schema.html from the base documentation. =cut