diff options
author | ivan <ivan> | 2002-02-10 17:30:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-02-10 17:30:33 +0000 |
commit | b05f4d252a27eab0a6fa8212abf920c0fa24a509 (patch) | |
tree | b43ac2d567f349b480289ec9d82ff9b5aba35b1a /httemplate/search | |
parent | f726710e136944a42cf3ac405eb5d29637eb67a6 (diff) |
eliminate duplicate cusomters before figuring to display a list or redirect.
eliiminates "2 matching found" displayed but only one in list.
Diffstat (limited to 'httemplate/search')
-rwxr-xr-x | httemplate/search/cust_main.cgi | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index b962c7c42..1e28ad57d 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -45,7 +45,7 @@ $limit .= "LIMIT $maxrecords" if $maxrecords; my $offset = $cgi->param('offset') || 0; $limit .= " OFFSET $offset" if $offset; -my $total; +my $total = 0; my(@cust_main, $sortby, $orderby); if ( $cgi->param('browse') ) { @@ -134,6 +134,9 @@ if ( $cgi->param('browse') ) { if $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me || ( $conf->exists('hidecancelledcustomers') && ! $cgi->param('showcancelledcustomers') ); + + my %saw = (); + @cust_main = grep { !$saw{$_->custnum}++ } @cust_main; } my %all_pkgs; |