X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcontact_phone.pm;h=610753fc002d1951084b38fafe31b334494de038;hb=d1ce3a8b4d22409ac13c746478a4598f23763506;hp=0eb216668dfee6e4a5fa4873f0af4712e0e1931f;hpb=b26d3c015c78d826fcd4ae9e7de8e761b379bcf4;p=freeside.git diff --git a/FS/FS/contact_phone.pm b/FS/FS/contact_phone.pm index 0eb216668..610753fc0 100644 --- a/FS/FS/contact_phone.pm +++ b/FS/FS/contact_phone.pm @@ -4,6 +4,7 @@ use base qw( FS::Record ); use strict; use FS::Record qw( qsearch qsearchs ); use FS::contact; +use FS::phone_type; =head1 NAME @@ -144,6 +145,16 @@ sub contact { qsearchs( 'contact', { 'contactnum' => $self->contactnum } ); } +sub phone_type { + my $self = shift; + qsearchs('phone_type', { 'phonetypenum' => $self->phonetypenum } ); +} + +sub typename { + my $self = shift; + $self->phone_type->typename; +} + =back =head1 BUGS