X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fcust_pay_or_refund.html;h=6bd3db6226657db0610d4615570b6a61caadfc2b;hb=b35525aa2582072e01d9a62f125e6803b5d3cb34;hp=1b1be5f36bf3bdf2fe79c96cc26e4fb45eea6500;hpb=cf54023e010df76e0c39ac70902877d7c4c94c6e;p=freeside.git diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index 1b1be5f36..6bd3db622 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -348,6 +348,13 @@ if ( $cgi->param('magic') ) { } + if ( $cgi->param('paymask') ) { + $cgi->param('paymask') =~ /^\s*(\d+)\s*$/ + or die "illegal paymask ". $cgi->param('paymask'); + my $regexp = regexp_sql(); + push @search, "$table.paymask $regexp '$1\$'"; + } + if ( $cgi->param('payinfo') ) { $cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo ". $cgi->param('payinfo'); @@ -455,6 +462,21 @@ if ( $cgi->param('magic') ) { } } + #check for customer tags + my $tagcount; + my $tags; + foreach my $p (keys $cgi->Vars) { + if ($p =~ /^tagnum(\d+)/ && $1) { + $tagcount++; + $addl_from .= " LEFT JOIN cust_tag ON (cust_tag.custnum = cust_pay.custnum)" unless $tagcount > 1; + $tags .= "$1,"; + } + } + if ($tags) { + $tags =~ s/,$//; + push @search, "cust_tag.tagnum in ($tags)"; + } + if ( $cgi->param('tax_names') ) { if ( dbh->{Driver}->{Name} =~ /^Pg/i ) {