X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FSearch.pm;h=ae219c80110390e5107a86b14194c1ce0f76c773;hp=9cd870b96b17238648abdecfa4019ca7d98f326d;hb=8b970de57d50e41b2f64f48dd372ba8473962933;hpb=70a5e47201ffd625d0b146af9ce407d285619690 diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 9cd870b96..ae219c801 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -1115,7 +1115,7 @@ sub search { # setup queries, subs, etc. for the search ## - $orderby ||= 'ORDER BY custnum'; + $orderby ||= 'ORDER BY cust_main.custnum'; # here is the agent virtualization push @where, @@ -1213,8 +1213,7 @@ sub search { } - # set select a customer only once. some joins create multiple customer records. - my $select = 'DISTINCT ON (cust_main.custnum) ' . join(', ', @select); + my $select = join(', ', @select); my $sql_query = { 'table' => 'cust_main',