X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_phone.pm;h=b91ba6551cbbe6fcabc21a631db3caf1dbf8e24c;hb=4b5d4c82766ef1869d03df63fa1e2f0dd050cb6a;hp=f7a44892ff2c2af174d9657f541d35e1104e4ab1;hpb=516ee97512ba48c43302a5d9a49e354260b027be;p=freeside.git diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index f7a44892f..b91ba6551 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -56,6 +56,8 @@ primary key Voicemail PIN +=item phone_name + =back =head1 METHODS @@ -92,6 +94,7 @@ sub table_info { disable_select => 1, }, 'sip_password' => 'SIP password', + 'name' => 'Name', }, }; } @@ -117,7 +120,10 @@ Returns the phone number. sub label { my $self = shift; - $self->phonenum; #XXX format it better + my $phonenum = $self->phonenum; #XXX format it better + my $label = $phonenum; + $label .= ' ('.$self->phone_name.')' if $self->phone_name; + $label; } =item insert @@ -182,6 +188,7 @@ sub check { || $self->ut_number('phonenum') || $self->ut_anything('sip_password') || $self->ut_numbern('pin') + || $self->ut_textn('phone_name') ; return $error if $error;