package contacts / "name per packages", RT#22185
[freeside.git] / FS / FS / contact_Mixin.pm
1 package FS::contact_Mixin;
2
3 use strict;
4 use FS::Record qw( qsearchs );
5 use FS::contact;
6
7 =item contact
8
9 Returns the contact object, if any (see L<FS::contact>).
10
11 =cut
12
13 sub contact {
14   my $self = shift;
15   return '' unless $self->contactnum;
16   qsearchs( 'contact', { 'contactnum' => $self->contactnum } );
17 }
18
19 1;