From ad434319858f0cf862498538ad17123ee61be1b4 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 8 May 2012 21:53:17 -0700 Subject: [PATCH] remove agent_svcid from cust_svc->label and instead put it explicity in customer package/service view & service search results, RT#17619 --- FS/FS/cust_svc.pm | 5 +---- httemplate/elements/tr-cust_svc.html | 2 +- httemplate/search/cust_svc.html | 5 ++++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index 604c654d8..2ec8f12c2 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -461,12 +461,9 @@ sub svc_label_long { shift->_svc_label('label_long', @_); } sub _svc_label { my( $self, $method, $svc_x ) = ( shift, shift, shift ); - my $identifier = $svc_x->$method(@_); - $identifier = '['.$self->agent_svcid.']'. $identifier if $self->agent_svcid; - ( $self->part_svc->svc, - $identifier, + $svc_x->$method(@_), $self->part_svc->svcdb, $self->svcnum ); diff --git a/httemplate/elements/tr-cust_svc.html b/httemplate/elements/tr-cust_svc.html index ca5de86b4..1ca22f6d4 100644 --- a/httemplate/elements/tr-cust_svc.html +++ b/httemplate/elements/tr-cust_svc.html @@ -24,7 +24,7 @@ Usage: <% FS::UI::Web::svc_link($m, $part_svc, $cust_svc) %> - <% + <% $cust_svc->agent_svcid ? $cust_svc->agent_svcid.': ' : '' %><% FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc) %> <% FS::UI::Web::svc_export_links($m, $part_svc, $cust_svc) %> diff --git a/httemplate/search/cust_svc.html b/httemplate/search/cust_svc.html index 585431eb4..2adcbd76f 100644 --- a/httemplate/search/cust_svc.html +++ b/httemplate/search/cust_svc.html @@ -13,7 +13,10 @@ sub { #$_[0]->svc. ': '. $_[0]->label; my($label, $value, $svcdb) = $_[0]->label; - "$label: $value"; + my $id = $_[0]->agent_svcid + ? $_[0]->agent_svcid.': ' + : ''; + "$label: $id$value"; }, # package? \&FS::UI::Web::cust_fields, -- 2.11.0