diff options
Diffstat (limited to 'httemplate/search/cdr.html')
| -rw-r--r-- | httemplate/search/cdr.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html index ca303d386..10b386383 100644 --- a/httemplate/search/cdr.html +++ b/httemplate/search/cdr.html @@ -258,6 +258,25 @@ if ( $cgi->param('acctid') =~ /\d/ ) { } ### +# accountcode +### + +if ( $cgi->param('accountcode') =~ /\S/ ) { + my $accountcode = $cgi->param('accountcode'); + my @accountcode = map { + ( my $v = $_ ) =~ s/^\s+|\s+$//g; + if ( $v =~ /'/ ) { $v =~ s/'/\\'/g; $v = "E'$v'" } + elsif ( length $v ) { $v = "'$v'" } + length $v ? $v : () + } grep /\S/, split /\R/, $accountcode; + if (@accountcode) { + my $search = 'accountcode IN ( ' . join( ',', @accountcode ) . ' )'; + push @qsearch, $search; + push @search, $search; + } +} + +### # finish it up ### |
