X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_phone.pm;h=04d5960b72d943c6b8edbd5aba6190b8adca21fa;hb=3f9734601a69a1e868d9b02598eb22c8b10929fa;hp=90ba249456896f3a8ca9432e8b90c8c073a3f0b8;hpb=f837ef4c8f5ab61c141f0859477be0675f1183bb;p=freeside.git diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index 90ba24945..04d5960b7 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -39,13 +39,19 @@ from FS::Record. The following fields are currently supported: =over 4 -=item svcnum - primary key +=item svcnum -=item countrycode - +primary key -=item phonenum - +=item countrycode -=item pin - +=item phonenum + +=item sip_password + +=item pin + +Voicemail PIN =back @@ -71,17 +77,18 @@ sub table_info { 'display_weight' => 60, 'cancel_weight' => 80, 'fields' => { - 'countrycode' => { label => 'Country code', - type => 'text', - disable_inventory => 1, - disable_select => 1, - }, - 'phonenum' => 'Phone number', - 'pin' => { label => 'Personal Identification Number', - type => 'text', - disable_inventory => 1, - disable_select => 1, - }, + 'countrycode' => { label => 'Country code', + type => 'text', + disable_inventory => 1, + disable_select => 1, + }, + 'phonenum' => 'Phone number', + 'pin' => { label => 'Personal Identification Number', + type => 'text', + disable_inventory => 1, + disable_select => 1, + }, + 'sip_password' => 'SIP password', }, }; } @@ -162,10 +169,15 @@ and replace methods. sub check { my $self = shift; + my $phonenum = $self->phonenum; + $phonenum =~ s/\D//g; + $self->phonenum($phonenum); + my $error = $self->ut_numbern('svcnum') || $self->ut_numbern('countrycode') || $self->ut_number('phonenum') + || $self->ut_anything('sip_password') || $self->ut_numbern('pin') ; return $error if $error;