diff options
author | mark <mark> | 2010-05-28 07:51:13 +0000 |
---|---|---|
committer | mark <mark> | 2010-05-28 07:51:13 +0000 |
commit | 9ae6d4c62167aea30ceac80aa72644ea93ac05e4 (patch) | |
tree | 2be3abb4085934bb69f8fed196ff211852b8f7d4 /httemplate | |
parent | 38c8fffd51a3e36c6359592f8350f8b31943cb17 (diff) |
RT#8465: add service label to downloadable package reports
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/search/cust_pkg.cgi | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 83cd206cb..74a3a6d1e 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -80,6 +80,18 @@ # '</table>'; # }, 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' => [ '', @@ -192,7 +205,7 @@ my %disable = ( '' => {}, ); -foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) { +foreach my $field (qw( setup last_bill bill adjourn susp expire cancel active )) { my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field); |