summaryrefslogtreecommitdiff
path: root/rt/lib/RT
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-11-25 15:08:05 -0800
committerMark Wells <mark@freeside.biz>2015-11-25 15:08:05 -0800
commit974347d88d264c60e65cbd22ac52553931b25ab8 (patch)
treebb3227a64d89afb51fd1927df9152e197a62fbf3 /rt/lib/RT
parentd5f8aa5cf1787238224add1a836f0d7577f3b9b7 (diff)
add service location to RT ticket search, #19154
Diffstat (limited to 'rt/lib/RT')
-rw-r--r--rt/lib/RT/URI/freeside/Internal.pm18
1 files changed, 14 insertions, 4 deletions
diff --git a/rt/lib/RT/URI/freeside/Internal.pm b/rt/lib/RT/URI/freeside/Internal.pm
index 33831bcac..2b09c879b 100644
--- a/rt/lib/RT/URI/freeside/Internal.pm
+++ b/rt/lib/RT/URI/freeside/Internal.pm
@@ -210,8 +210,8 @@ sub CustomerResolver {
sub CustomerInfo {
my $self = shift;
- $self = $self->CustomerResolver;
return $self->{CustomerInfo} if $self->{CustomerInfo};
+ $self = $self->CustomerResolver;
my $rec = $self->_FreesideGetRecord() if $self;
if (!$rec) {
@@ -261,23 +261,33 @@ sub CustomerInfo {
$info->{"bill_location"} = $bill_location->location_label(no_prefix => 1);
$info->{"ship_location"} = $ship_location->location_label(no_prefix => 1);
-
return $self->{CustomerInfo} = $info;
}
sub ServiceInfo {
my $self = shift;
$self->{fstable} eq 'cust_svc' or return;
+ return $self->{ServiceInfo} if $self->{ServiceInfo};
+
my $rec = $self->_FreesideGetRecord() or return;
my $cust_svc = $rec->{'_object'};
my $svc_x = $cust_svc->svc_x;
my $part_svc = $cust_svc->part_svc;
- return $self->{ServiceInfo} ||= {
+ my $locationnum = $cust_svc->cust_pkg->locationnum;
+ my $cust_location = qsearchs('cust_location', { locationnum => $locationnum});
+ my @lf = FS::cust_main->location_fields;
+
+ # location fields are not prefixed
+ my $info = {
$cust_svc->hash,
$svc_x->hash,
+ $cust_location->hash,
ServiceType => $part_svc->svc,
Label => $self->AsString,
- }
+ };
+ $info->{'location'} = $cust_location->location_label(no_prefix => 1);
+
+ return $self->{ServiceInfo} = $info;
}
1;