From: Christopher Burger Date: Mon, 12 Jun 2017 21:52:34 +0000 (-0400) Subject: RT# 76028 - Added search field Card Last 4#: to allow the filtering of payment report... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=8743bba0dc26684542301b91ee6a9192e893ab9c RT# 76028 - Added search field Card Last 4#: to allow the filtering of payment report by last four of credit card used. Only shows when card_masking_method is set to display last 4 --- diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index 1b1be5f36..96d044fa0 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'); diff --git a/httemplate/search/elements/report_cust_pay_or_refund.html b/httemplate/search/elements/report_cust_pay_or_refund.html index 1cc77f728..b69f82624 100644 --- a/httemplate/search/elements/report_cust_pay_or_refund.html +++ b/httemplate/search/elements/report_cust_pay_or_refund.html @@ -36,6 +36,14 @@ Examples: size => 18, &> +% if (substr($conf->config('card_masking_method'), -5) eq 'last4' || !$conf->config('card_masking_method')) { + + <% mt('Card Last 4 #:') |h %> + + + + +% } <% mt('Check #:') |h %>