summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-11-15 14:25:08 -0800
committerIvan Kohler <ivan@freeside.biz>2013-11-15 14:25:08 -0800
commit3e8cad17fc7fd48d4b622771d6b77c6c136d80f2 (patch)
treec5490df2770557b8c4426e709c8750bd3921f62e /FS
parentbeeaed152f7b8d6e663176abfe53a2fa058657e2 (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