diff options
| -rw-r--r-- | FS/FS/Conf.pm | 8 | ||||
| -rw-r--r-- | FS/FS/svc_pbx.pm | 4 | 
2 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 11658a8c1..cd2792b08 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2194,6 +2194,14 @@ and customer address. Include units.',    },    { +    'key'         => 'global_unique-pbx_title', +    'section'     => '', +    'description' => 'Global phone number uniqueness control: enabled (usual setting - title must e unique), or disabled turns off duplicate checking for this field.', +    'type'        => 'select', +    'select_enum' => [ 'enabled', 'disabled' ], +  }, + +  {      'key'         => 'svc_external-skip_manual',      'section'     => 'UI',      'description' => 'When provisioning svc_external services, skip manual entry of id and title fields in the UI.  Usually used in conjunction with an export that populates these fields (i.e. artera_turbo).', diff --git a/FS/FS/svc_pbx.pm b/FS/FS/svc_pbx.pm index 7c4385cde..d2760a504 100644 --- a/FS/FS/svc_pbx.pm +++ b/FS/FS/svc_pbx.pm @@ -3,6 +3,7 @@ package FS::svc_pbx;  use strict;  use base qw( FS::svc_External_Common );  use FS::Record qw( qsearch qsearchs dbh ); +use FS::Conf;  use FS::cust_svc;  use FS::svc_phone;  use FS::svc_acct; @@ -258,6 +259,9 @@ sub check {  sub _check_duplicate {    my $self = shift; +  my $conf = new FS::Conf; +  return '' if $conf->config('global_unique-pbx_title') eq 'disabled'; +    $self->lock_table;    if ( qsearchs( 'svc_pbx', { 'title' => $self->title } ) ) {  | 
