X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcdr.html;h=778799b1fc21a293d8ed2345b46589a738624e95;hb=06fd3d9f3ca53b2d2f7595e55be4b129ca69511c;hp=ca303d38631d536e9746dd6a1cf179e12b71eb30;hpb=4d3d1f29b5cb6d01e3474d0037fc4c6c866e8311;p=freeside.git diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html index ca303d386..778799b1f 100644 --- a/httemplate/search/cdr.html +++ b/httemplate/search/cdr.html @@ -258,6 +258,23 @@ 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; # trim margin whitespace + length $v ? dbh->quote($v) : () + } grep /\S/, split /\R/, $accountcode; # collect non-trivial lines + if (@accountcode) { + my $search = 'accountcode IN ( ' . join( ',', @accountcode ) . ' )'; + push @qsearch, $search; + push @search, $search; + } +} + +### # finish it up ###