X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Ftype_pkgs.pm;h=bf34e7cdaba6957bf40b4d2ab088d2272c2b5867;hb=9e9e6b1f26ec10fb6622ade3712bfc06e9699987;hp=8e0d4ef5655b44a99e7c9beca3f2cf8aeed2bdaa;hpb=6cd87c0d3b5280446301c647fa5f1ec5a593fa3f;p=freeside.git diff --git a/FS/FS/type_pkgs.pm b/FS/FS/type_pkgs.pm index 8e0d4ef56..bf34e7cda 100644 --- a/FS/FS/type_pkgs.pm +++ b/FS/FS/type_pkgs.pm @@ -35,6 +35,8 @@ FS::Record. The following fields are currently supported: =over 4 +=item typepkgnum - primary key + =item typenum - Agent type, see L =item pkgpart - Billing item definition, see L @@ -80,7 +82,8 @@ sub check { my $self = shift; my $error = - $self->ut_number('typenum') + $self->ut_numbern('typepkgnum') + || $self->ut_number('typenum') || $self->ut_number('pkgpart') ; return $error if $error; @@ -91,14 +94,23 @@ sub check { return "Unknown pkgpart" unless qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } ); - ''; #no error + $self->SUPER::check; } -=back +=item part_pkg + +Returns the FS::part_pkg object associated with this record. + +=cut -=head1 VERSION +sub part_pkg { + my $self = shift; + qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } ); +} -$Id: type_pkgs.pm,v 1.1 1999-08-04 09:03:53 ivan Exp $ +=cut + +=back =head1 BUGS