[freeside-commits] branch master updated. 3ccf7174fccb0b576a8c34838b3db4a429635483

Ivan ivan at 420.am
Thu Apr 12 16:14:26 PDT 2012


The branch, master has been updated
       via  3ccf7174fccb0b576a8c34838b3db4a429635483 (commit)
      from  c683be2e0bc89b9d11dfd5454a6cd21161b752ef (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 3ccf7174fccb0b576a8c34838b3db4a429635483
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Apr 12 16:14:23 2012 -0700

    display apple and android store payments by name

diff --git a/FS/FS/payby.pm b/FS/FS/payby.pm
index 33ed425..d1961a5 100644
--- a/FS/FS/payby.pm
+++ b/FS/FS/payby.pm
@@ -176,6 +176,11 @@ sub realtime {  # can use realtime payment facilities
   return $hash{$payby}->{realtime};
 }
 
+sub payby2shortname {
+  my $self = shift;
+  map { $_ => $hash{$_}->{shortname} } $self->payby;
+}
+
 sub payby2longname {
   my $self = shift;
   map { $_ => $hash{$_}->{longname} } $self->payby;
diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html
index c453ffa..c7a7c80 100644
--- a/httemplate/view/cust_main/payment_history.html
+++ b/httemplate/view/cust_main/payment_history.html
@@ -500,14 +500,15 @@ foreach my $cust_refund ($cust_main->cust_refund) {
 sub translate_payby {
     my ($payby,$payinfo) = (shift,shift);
     my %payby = (
+        FS::payby->payby2shortname,
         BILL    => $payinfo ? emt('Check #') : '',
         CHEK    => emt('Electronic check '),
         PREP    => emt('Prepaid card '),
         CARD    => emt('Credit card #'),
         COMP    => emt('Complimentary by '),
-        CASH    => emt('Cash'),
-        WEST    => emt('Western Union'),
-        MCRD    => emt('Manual credit card'),
+        #CASH    => emt('Cash'),
+        #WEST    => emt('Western Union'),
+        #MCRD    => emt('Manual credit card'),
     );
     $payby = (exists $payby{$payby}) ? $payby{$payby} : $payby; 
     $payby;
@@ -516,6 +517,7 @@ sub translate_payby {
 sub translate_payby_refund {
     my ($payby,$payinfo) = (shift,shift);
     my %payby = (
+        FS::payby->payby2shortname,
         BILL    => $payinfo ? emt('Check #') : emt('Check'),
         CHEK    => emt('Electronic check '),
         CARD    => emt('Credit card #'),

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

Summary of changes:
 FS/FS/payby.pm                                 |    5 +++++
 httemplate/view/cust_main/payment_history.html |    8 +++++---
 2 files changed, 10 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list