summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhttemplate/search/cust_pkg.cgi19
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);