summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-06-12 17:52:34 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-06-13 09:09:25 -0400
commit884bd92cd47b9602dab999502877545a5bc5be98 (patch)
tree75b375d8121b10d642ce2ae84fb4ea7dc9d2f4af
parent016ff1020b1c0f1c4258c17209a9a7e48402dd5c (diff)
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
-rwxr-xr-xhttemplate/search/elements/cust_pay_or_refund.html7
-rw-r--r--httemplate/search/elements/report_cust_pay_or_refund.html8
2 files changed, 15 insertions, 0 deletions
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index cbda680ca..9e336faa9 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -467,6 +467,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')) {
+ <TR>
+ <TD ALIGN="right"><% mt('Card Last 4 #:') |h %></TD>
+ <TD>
+ <INPUT TYPE="text" ID="paymask" NAME="paymask">
+ </TD>
+ </TR>
+% }
<TR>
<TD ALIGN="right"><% mt('Check #:') |h %> </TD>
<TD>