phone devices (for netsapiens integration), RT#5226
[freeside.git] / FS / FS / svc_phone.pm
index ce767d5..badbb4e 100644 (file)
@@ -7,6 +7,7 @@ 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 );
 
@@ -102,7 +103,7 @@ sub table_info {
                             disable_select => 1,
                           },
         'sip_password' => 'SIP password',
-        'name'         => 'Name',
+        'phone_name'   => 'Name',
     },
   };
 }
@@ -326,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