[freeside-commits] branch FREESIDE_3_BRANCH updated. 5e6b981ccafac97a17d64924ef770c471ca28ab0

Jonathan Prykop jonathan at 420.am
Fri Oct 9 21:39:00 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  5e6b981ccafac97a17d64924ef770c471ca28ab0 (commit)
      from  bdbda2196d839c13a25da3ec5569b93d121d10f3 (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 5e6b981ccafac97a17d64924ef770c471ca28ab0
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Oct 6 01:46:31 2015 -0500

    RT#37038 Add Card Type Name to Payment Report

diff --git a/FS/FS/payinfo_Mixin.pm b/FS/FS/payinfo_Mixin.pm
index 7025e4e..023aacd 100644
--- a/FS/FS/payinfo_Mixin.pm
+++ b/FS/FS/payinfo_Mixin.pm
@@ -243,7 +243,11 @@ sub payby_payinfo_pretty {
   my $locale = shift;
   my $lh = FS::L10N->get_handle($locale);
   if ( $self->payby eq 'CARD' ) {
-    $lh->maketext('Card #') . $self->paymask;
+    if ($self->paymask =~ /tokenized/) {
+      $lh->maketext('Tokenized Card');
+    } else {
+      $lh->maketext('Card #') . $self->paymask;
+    }
   } elsif ( $self->payby eq 'CHEK' ) {
 
     #false laziness w/view/cust_main/payment_history.html::translate_payinfo
diff --git a/httemplate/search/cust_pay.html b/httemplate/search/cust_pay.html
index 03474c1..e466f6a 100755
--- a/httemplate/search/cust_pay.html
+++ b/httemplate/search/cust_pay.html
@@ -3,4 +3,5 @@
                 'amount_field'  => 'paid',
                 'name_singular' => emt('payment'),
                 'name_verb'     => emt('paid'),
+                'show_card_type' => 1,
 &>
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 5808e5f..1fea67c 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -184,6 +184,16 @@ push @fields, 'payby_payinfo_pretty',
 push @link_onclicks, $sub_receipt, '';
 push @sort_fields, 'paysort', $amount_field;
 
+if ($opt{'show_card_type'}) {
+  push @header, emt('Card Type');
+  $align .= 'r';
+  push @links, '';
+  push @fields, sub { 
+    (($_[0]->payby eq 'CARD') && ($_[0]->paymask !~ /N\/A/)) ? cardtype($_[0]->paymask) : ''
+  };
+  push @sort_fields, '';
+}
+
 if ( $unapplied ) {
   push @header, emt('Unapplied');
   $align .= 'r';

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

Summary of changes:
 FS/FS/payinfo_Mixin.pm                             |    6 +++++-
 httemplate/search/cust_pay.html                    |    1 +
 httemplate/search/elements/cust_pay_or_refund.html |   10 ++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list