internationalization/localization, RT12515
[freeside.git] / httemplate / view / cust_main / payment_history / attempted_payment.html
1 <I><% mt('Payment attempt') |h %> <% $info |h %></I>
2 <%init>
3
4 my( $cust_pay_pending, %opt ) = @_;
5
6 my $date_format = $opt{'date_format'} || '%m/%d/%Y';
7
8 my $curuser = $FS::CurrentUser::CurrentUser;
9
10 my $payby = $cust_pay_pending->payby;
11
12 my $payinfo;
13 if ( $payby eq 'CARD' ) {
14   $payinfo = $cust_pay_pending->paymask;
15 } elsif ( $payby eq 'CHEK' ) {
16   my( $account, $aba ) = split('@', $cust_pay_pending->paymask );
17   $payinfo = mt("ABA [_1], Acct #[_2]",$aba,$account);
18 } else {
19   $payinfo = $cust_pay_pending->payinfo;
20 }
21
22 $payby = translate_payby($payby,$payinfo);
23 my $info = $payby ? "($payby$payinfo)" : '';
24
25 if ( $opt{'pkg-balances'} && $cust_pay_pending->pkgnum ) {
26   my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum'=>$cust_pay_pending->pkgnum } );
27   $info .= ' for '. $cust_pkg->pkg_label_long;
28 }
29
30 $info .= ': '. $cust_pay_pending->statustext
31   if length($cust_pay_pending->statustext);
32
33 </%init>