summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/payby.pm5
-rw-r--r--httemplate/view/cust_main/payment_history.html8
2 files changed, 10 insertions, 3 deletions
diff --git a/FS/FS/payby.pm b/FS/FS/payby.pm
index 33ed42507..d1961a58d 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 c453ffadc..c7a7c8024 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 #'),