X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history.html;h=a00538416048e667f612a5acd0d307a94733aaab;hb=4aa7ddaf3e491d34a8caaa7869ccd83dc6d50d52;hp=204647f9711793fa2b32d74953eafd9042ba539c;hpb=dfc2e50770de813580136117ff4335fc83237df5;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 204647f97..a00538416 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -415,7 +415,7 @@ my %opt = ( 'Apply payment', 'Refund credit card payment', 'Refund Echeck payment', 'Credit card void', 'Echeck void', 'Void payments', 'Unvoid payments', 'Delete payment', 'Unapply payment', - 'Apply credit', 'Delete Credit', 'Unapply credit', + 'Apply credit', 'Delete credit', 'Unapply credit', 'Delete refund', 'Billing event reports', 'View customer billing events', ) @@ -616,13 +616,18 @@ sub translate_payinfo { my $payby = $object->payby; my $payinfo = $object->payinfo; - my $conf = new FS::Conf; - if ( $payby eq 'CARD' ) { $payinfo = $object->paymask; } elsif ( $payby eq 'CHEK' ) { + #false laziness w/payinfo_Mixin::payby_payinfo_pretty, should use that my( $account, $aba ) = split('@', $object->paymask ); - $payinfo = emt("ABA [_1], Acct #[_2]",$aba,$account); + if ( $aba =~ /^(\d{5})\.(\d{3})$/ ) { #blame canada + my($branch, $routing) = ($1, $2); + $payinfo = emt("Routing [_1], Branch [_2], Acct [_3]", + $routing, $branch, $account); + } else { + $payinfo = emt("Routing [_1], Acct [_2]", $aba, $account); + } } ($payby,$payinfo);