summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-11-15 14:25:03 -0800
committerIvan Kohler <ivan@freeside.biz>2013-11-15 14:25:03 -0800
commit8fcb85e75b56d703cddc9569593c3468d6e49c7e (patch)
tree9904cce378f669705e80a13772b1c06b27f5cde8 /FS
parent45f3aff8abf141f785882be779ad52c23f600e6c (diff)
fix detaching w/cust_main-require_phone, RT#25987
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/contact_phone.pm11
1 files changed, 11 insertions, 0 deletions
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