summaryrefslogtreecommitdiff
path: root/rt/lib/RT/URI/freeside/Internal.pm
diff options
context:
space:
mode:
authormark <mark>2012-02-17 02:35:39 +0000
committermark <mark>2012-02-17 02:35:39 +0000
commit29b131510b1bf65ec799f9ee3de10af5dbe07573 (patch)
tree80d0dda0a30d636c78de1999b0acdd0ce26124d8 /rt/lib/RT/URI/freeside/Internal.pm
parent3a467bcd3373738120f092c5a9ad3c7e8223822f (diff)
search tickets by customer advertising source, #16490
Diffstat (limited to 'rt/lib/RT/URI/freeside/Internal.pm')
-rw-r--r--rt/lib/RT/URI/freeside/Internal.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/rt/lib/RT/URI/freeside/Internal.pm b/rt/lib/RT/URI/freeside/Internal.pm
index 7b8efa0d3..4069b87af 100644
--- a/rt/lib/RT/URI/freeside/Internal.pm
+++ b/rt/lib/RT/URI/freeside/Internal.pm
@@ -53,7 +53,7 @@ See L<RT::URI::freeside> for public/private interface documentation.
-sub _FreesideGetRecord {
+sub _FreesideGetRecord { # cache this?
my $self = shift;
my ($table, $pkey) = ($self->{'fstable'}, $self->{'fspkey'});
@@ -167,4 +167,11 @@ sub CustomerTags {
} @part_tag;
}
+sub Referral {
+ my $self = shift;
+ my $rec = $self->_FreesideGetRecord() or return;
+ my $ref = qsearchs('part_referral', { refnum => $rec->{'_object'}->refnum });
+ $ref ? $ref->referral : ''
+}
+
1;