summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/payment_history/pending_payment.html
blob: cf7ef7c0852f639448306fd00f491a2cdda8d892 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<b><font size="+1" color="#FF0000"><% mt('Pending payment') |h %> </font></b> <% "$info $status ($link)" %>
<%init>

my( $cust_pay_pending, %opt ) = @_;

my ($payby, $payinfo) = translate_payinfo($cust_pay_pending);
my $target = "$payby$payinfo";
$payby = translate_payby($payby,$payinfo);
my $info = $payby ? "($payby$payinfo)" : '';

my %statusaction = (
  'new'        => 'delete',
  'thirdparty' => 'delete',
  'pending'    => 'complete',
  'authorized' => 'complete',
  'captured'   => 'capture',
);

my $edit_pending =
  $FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments');

my $status = emt("Status: [_1]",$cust_pay_pending->status);

my $action = $statusaction{$cust_pay_pending->status};

my $link = "";
if ( $action && $edit_pending ) {
    $link = include('/elements/popup_link.html',
	       'action' => $p. 'edit/cust_pay_pending.html'.
			     '?paypendingnum='. $cust_pay_pending->paypendingnum.
			     ";action=$action",
	       'label'  => emt($action),
	       'color'  => '#ff0000',
	       'width'  => 655,
	       'height' => ( $action eq 'delete' ? 480 : 575 ),
	       'actionlabel' => emt(ucfirst($action). ' pending payment'),
	    );
}

</%init>