agent-virtualize VoIP rates, RT#29183
[freeside.git] / FS / FS / rate.pm
index 4052807..b2348ca 100644 (file)
@@ -4,6 +4,7 @@ use base qw(FS::Record);
 use strict;
 use vars qw( $DEBUG );
 use FS::Record qw( qsearch qsearchs dbh fields );
+#use FS::agent; #causes a weird dep loop in freeside-cdrrated, only needed for v3-style manual FK-checking, so, probably not bother
 use FS::rate_detail;
 
 $DEBUG = 0;
@@ -34,10 +35,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<FS::agent>) for agent-virtualized rates.
+
 =back
 
 =head1 METHODS
@@ -253,15 +262,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;