summaryrefslogtreecommitdiff
path: root/FS/FS/contact_Mixin.pm
blob: 6e8f315b9d573fb31feed958e47c6a36549393dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package FS::contact_Mixin;

use strict;
use FS::Record qw( qsearchs );
use FS::contact;

=item contact_obj

Returns the contact object, if any (see L<FS::contact>).

=cut

sub contact_obj {
  my $self = shift;
  return '' unless $self->contactnum;
  qsearchs( 'contact', { 'contactnum' => $self->contactnum } );
}

1;