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, $payinfo) = translate_payinfo($cust_pay_pending);
11 my $target = "$payby$payinfo";
12 $payby = translate_payby($payby,$payinfo);
13 my $info = $payby ? "($payby$payinfo)" : '';
14
15 my %statusaction = (
16   'new'        => 'delete',
17   'thirdparty' => 'delete',
18   'pending'    => 'complete',
19   'captured'   => 'capture',
20 );
21
22 my $edit_pending =
23   $FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments');
24
25 my $status = mt("Status: [_1]",$cust_pay_pending->status);
26
27 my $action = $statusaction{$cust_pay_pending->status};
28
29 my $link = "";
30 if ( $action && $edit_pending ) {
31     $link = include('/elements/popup_link.html',
32                'action' => $p. 'edit/cust_pay_pending.html'.
33                              '?paypendingnum='. $cust_pay_pending->paypendingnum.
34                              ";action=$action",
35                'label'  => mt($action),
36                'color'  => '#ff0000',
37                'width'  => 655,
38                'height' => ( $action eq 'delete' ? 480 : 575 ),
39                'actionlabel' => mt(ucfirst($action). ' pending payment'),
40             );
41 }
42
43 </%init>