X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcdr.html;h=778799b1fc21a293d8ed2345b46589a738624e95;hb=cabd4b54169356d298b05c826c3fd549c2fb22bf;hp=ca303d38631d536e9746dd6a1cf179e12b71eb30;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;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 ###