diff options
Diffstat (limited to 'FS/FS/svc_phone.pm')
-rw-r--r-- | FS/FS/svc_phone.pm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index fca33690d..8e39b9f10 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -63,9 +63,51 @@ points to. You can ask the object for a copy with the I<hash> method. =cut # the new method can be inherited from FS::Record, if a table method is defined +# +sub table_info { + { + 'name' => 'Phone number', + 'sorts' => 'phonenum', + 'display_weight' => 60, + 'cancel_weight' => 80, + 'fields' => { + 'countrycode' => { label => 'Country code', + type => 'text', + disable_inventory => 1, + }, + 'phonenum' => 'Phone number', + 'pin' => { label => 'Personal Identification Number', + type => 'text', + disable_inventory => 1, + }, + }, + }; +} sub table { 'svc_phone'; } +=item search_sql STRING + +Class method which returns an SQL fragment to search for the given string. + +=cut + +sub search_sql { + my( $class, $string ) = @_; + $class->search_sql_field('phonenum', $string ); +} + +=item label + +Returns the phone number. + +=cut + +sub label { + my $self = shift; + $self->phonenum; #XXX format it better +} + =item insert Adds this record to the database. If there is an error, returns the error, |