From: mark Date: Fri, 28 May 2010 07:51:01 +0000 (+0000) Subject: RT#8465: add service label to downloadable package reports X-Git-Tag: root_of_svc_elec_features~214 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=4ba00d7b85f35b6297cf8d96a05949cf1c067ce0 RT#8465: add service label to downloadable package reports --- diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index adbec7a74..74a3a6d1e 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -80,6 +80,18 @@ # ''; # }, sub { + my $cust_pkg = shift; + my $type = $cgi->param('_type') || ''; + if ($type =~ /xls|csv/) { + my $cust_svc = $cust_pkg->primary_cust_svc; + if($cust_svc) { + return join ": ",($cust_svc->label)[0,1]; + } + else { + return ''; + } + } + else { [ map { [ { 'data' => $_->[0]. ':', @@ -91,9 +103,10 @@ $_->[2]. '.cgi?'. $_->[3], }, ]; - } shift->labels + } $cust_pkg->labels ]; - }, + } + } ], 'color' => [ '',