RT# 76028 - Added search field Card Last 4#: to allow the filtering of payment report...
authorChristopher Burger <burgerc@freeside.biz>
Mon, 12 Jun 2017 21:52:34 +0000 (17:52 -0400)
committerChristopher Burger <burgerc@freeside.biz>
Mon, 12 Jun 2017 21:52:34 +0000 (17:52 -0400)
httemplate/search/elements/cust_pay_or_refund.html
httemplate/search/elements/report_cust_pay_or_refund.html

index 1b1be5f..96d044f 100755 (executable)
@@ -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');
index 1cc77f7..b69f826 100644 (file)
@@ -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>