From 3907da4465b5ca211f9af7556f811eff252fcd23 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Jun 2011 21:52:57 +0000 Subject: [PATCH] fix svc_port searches --- FS/FS/svc_port.pm | 3 ++- httemplate/search/cust_svc.html | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/FS/FS/svc_port.pm b/FS/FS/svc_port.pm index 7dc70f985..a0252b492 100644 --- a/FS/FS/svc_port.pm +++ b/FS/FS/svc_port.pm @@ -80,7 +80,8 @@ sub table_info { 'name' => 'Port', #'name_plural' => 'Ports', #optional, #'longname_plural' => 'Ports', #optional - 'sorts' => [ 'svcnum', 'serviceid' ], # optional sort field (or arrayref of sort fields, main first) + #'sorts' => [ 'svcnum', 'serviceid' ], # optional sort field (or arrayref of sort fields, main first) + 'sorts' => [ 'serviceid' ], # optional sort field (or arrayref of sort fields, main first) 'display_weight' => 75, 'cancel_weight' => 10, 'fields' => { diff --git a/httemplate/search/cust_svc.html b/httemplate/search/cust_svc.html index 72ecb8e35..9cf4bbda6 100644 --- a/httemplate/search/cust_svc.html +++ b/httemplate/search/cust_svc.html @@ -75,6 +75,7 @@ if ( length( $cgi->param('search_svc') ) ) { $cgi->param('svcdb') =~ /^(svc_\w+)$/ or die "unknown svcdb"; push @extra_sql, "svcdb = '$1'"; + $addl_from .= " LEFT JOIN $1 USING ( svcnum ) "; push @extra_sql, 'pkgnum IS NULL' if $cgi->param('magic') eq 'unlinked'; -- 2.11.0