get rid of cdr_upstream_rate table and some other old convergent cruft
[freeside.git] / FS / FS / svc_phone.pm
index 5cf3985..badbb4e 100644 (file)
@@ -4,8 +4,10 @@ use strict;
 use vars qw( @ISA @pw_set $conf );
 use FS::Conf;
 use FS::Record qw( qsearch qsearchs );
+use FS::Msgcat qw(gettext);
 use FS::svc_Common;
 use FS::part_svc;
+use FS::phone_device;
 
 @ISA = qw( FS::svc_Common );
 
@@ -101,7 +103,7 @@ sub table_info {
                             disable_select => 1,
                           },
         'sip_password' => 'SIP password',
-        'name'         => 'Name',
+        'phone_name'   => 'Name',
     },
   };
 }
@@ -325,6 +327,17 @@ sub radius_groups {
   ();
 }
 
+=item phone_device
+
+Returns any FS::phone_device records associated with this service.
+
+=cut
+
+sub phone_device {
+  my $self = shift;
+  qsearch('phone_device', { 'svcnum' => $self->svcnum } );
+}
+
 =back
 
 =head1 BUGS