internationalization/localization, RT12515
[freeside.git] / httemplate / view / cust_main / payment_history / pending_payment.html
1 <b><font size="+1" color="#FF0000"><% mt('Pending payment') |h %> </font></b> <% "$info $status ($link)" %>
2 <%init>
3
4 my( $cust_pay_pending, %opt ) = @_;
5
6 my $conf = new FS::Conf;
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 my $target = "$payby$payinfo";
23 $payby = translate_payby($payby,$payinfo);
24 my $info = $payby ? "($payby$payinfo)" : '';
25
26 my %statusaction = (
27   'new'        => 'delete',
28   'thirdparty' => 'delete',
29   'pending'    => 'complete',
30   'captured'   => 'capture',
31 );
32
33 my $edit_pending =
34   $FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments');
35
36 my $status = "Status: ".$cust_pay_pending->status;
37
38 my $action = $statusaction{$cust_pay_pending->status};
39
40 my $link = "";
41 if ( $action && $edit_pending ) {
42     $link = include('/elements/popup_link.html',
43                'action' => $p. 'edit/cust_pay_pending.html'.
44                              '?paypendingnum='. $cust_pay_pending->paypendingnum.
45                              ";action=$action",
46                'label'  => mt($action),
47                'color'  => '#ff0000',
48                'width'  => 655,
49                'height' => ( $action eq 'delete' ? 480 : 575 ),
50                'actionlabel' => mt(ucfirst($action). ' pending payment'),
51             );
52 }
53
54 </%init>