X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Frate.pm;h=aef9d8bec3126e5c440d9dd8e626bffd9174186c;hb=f9930edeaceb217a6503fa49078fcff2b588caf8;hp=49ac938fd568b441169ad4fcb5b5c9acabbad614;hpb=f3e0ac2b009c4edd5692cb587ff709dac2223ebe;p=freeside.git diff --git a/FS/FS/rate.pm b/FS/FS/rate.pm index 49ac938fd..aef9d8bec 100644 --- a/FS/FS/rate.pm +++ b/FS/FS/rate.pm @@ -1,12 +1,11 @@ package FS::rate; +use base qw(FS::Record); use strict; -use vars qw( @ISA $DEBUG ); +use vars qw( $DEBUG ); use FS::Record qw( qsearch qsearchs dbh fields ); use FS::rate_detail; -@ISA = qw(FS::Record); - $DEBUG = 0; =head1 NAME @@ -35,10 +34,18 @@ FS::Record. The following fields are currently supported: =over 4 -=item ratenum - primary key +=item ratenum + +primary key =item ratename +Rate name + +=item agentnum + +Optional agent (see L) for agent-virtualized rates. + =back =head1 METHODS @@ -254,15 +261,13 @@ and replace methods. =cut -# the check method should currently be supplied - FS::Record contains some -# data checking routines - sub check { my $self = shift; my $error = $self->ut_numbern('ratenum') || $self->ut_text('ratename') + #|| $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum') ; return $error if $error; @@ -382,14 +387,6 @@ sub dest_detail { Returns all region-specific details (see L) for this rate. -=cut - -sub rate_detail { - my $self = shift; - qsearch( 'rate_detail', { 'ratenum' => $self->ratenum } ); -} - - =back =head1 SUBROUTINES