[freeside-commits] branch FREESIDE_4_BRANCH updated. 851f387f9e4a9e92625708f71f57193ad7dfbe42

Christopher Burger burgerc at 420.am
Mon Jun 12 16:30:49 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  851f387f9e4a9e92625708f71f57193ad7dfbe42 (commit)
      from  56488529c04e33c093cc8d28a5e0e7654d74dc43 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 851f387f9e4a9e92625708f71f57193ad7dfbe42
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon Jun 12 17:52:34 2017 -0400

    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 9803cab..b636247 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -502,6 +502,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 1cc77f7..b69f826 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>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/elements/cust_pay_or_refund.html        |    7 +++++++
 httemplate/search/elements/report_cust_pay_or_refund.html |    8 ++++++++
 2 files changed, 15 insertions(+)




More information about the freeside-commits mailing list