diff options
author | ivan <ivan> | 2005-05-03 09:56:41 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-05-03 09:56:41 +0000 |
commit | d6e8064270fb8eeeedda315c50e3c58796393212 (patch) | |
tree | cd5b752f641a843d6e0c929b19ad4d1d522d0f4d | |
parent | 22095d167d138ae7561b01d5cfbf4df5ae73a4c8 (diff) |
on receipts, show "Electronic Check" instead of "Chek" for payby = CHEK transactions
-rw-r--r-- | FS/FS/cust_pay.pm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index fa97ba9eb..201ada91c 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -183,7 +183,8 @@ sub insert { my $payby = $self->payby; my $payinfo = $self->payinfo; $payby =~ s/^BILL$/Check/ if $payinfo; - $payinfo = $self->payinfo_masked if $payby eq 'CARD'; + $payinfo = $self->payinfo_masked if $payby eq 'CARD' || $payby eq 'CHEK'; + $payby =~ s/^CHEK$/Electronic check/; my $error = send_email( 'from' => $conf->config('invoice_from'), #??? well as good as any @@ -464,8 +465,16 @@ by 'x'es. Useful for displaying credit cards. sub payinfo_masked { my $self = shift; - my $payinfo = $self->payinfo; - 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)); + #some false laziness w/cust_main::paymask + if ( $self->payby eq 'CARD' ) { + my $payinfo = $self->payinfo; + 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)); + } elsif ( $self->payby eq 'CHEK' ) { + my( $account, $aba ) = split('@', $self->payinfo ); + 'x'x(length($account)-2). substr($account,(length($account)-2)). "@". $aba; + } else { + $self->payinfo; + } } =back |