<% mt('Pending payment') |h %> <% "$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'), ); }