X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fsvc_phone.pm;h=7405a71fd76d38e89e0ad7b72e6c356c0963c457;hp=0ed01ad366987c911e38450c2265c7eb3ccb2b17;hb=4bd9d3d9dc5325f0d7bd498e457140b15d01866c;hpb=593ae0ec1c7cfd30203902a01f7439ba77ee2787 diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index 0ed01ad36..7405a71fd 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -1,7 +1,7 @@ package FS::svc_phone; use strict; -use base qw( FS::svc_Domain_Mixin FS::svc_Common ); +use base qw( FS::svc_Domain_Mixin FS::location_Mixin FS::svc_Common ); use vars qw( @pw_set $conf ); use FS::Conf; use FS::Record qw( qsearch qsearchs dbh ); @@ -10,6 +10,7 @@ use FS::part_svc; use FS::phone_device; use FS::svc_pbx; use FS::svc_domain; +use FS::cust_location; #avoid l 1 and o O 0 @pw_set = ( 'a'..'k', 'm','n', 'p-z', 'A'..'N', 'P'..'Z' , '2'..'9' ); @@ -121,6 +122,11 @@ sub table_info { select_label => 'domain', disable_inventory => 1, }, + 'locationnum' => { + label => 'E911 location', + disable_inventory => 1, + disable_select => 1, + }, }, }; } @@ -278,6 +284,7 @@ sub check { || $self->ut_textn('phone_name') || $self->ut_foreign_keyn('pbxsvc', 'svc_pbx', 'svcnum' ) || $self->ut_foreign_keyn('domsvc', 'svc_domain', 'svcnum' ) + || $self->ut_foreign_keyn('locationnum', 'cust_location', 'locationnum') ; return $error if $error;