<% mt('Pending payment') |h %> <% "$info $status ($link)" %> <%init> my( $cust_pay_pending, %opt ) = @_; my $conf = new FS::Conf; my $curuser = $FS::CurrentUser::CurrentUser; my $payby = $cust_pay_pending->payby; my $payinfo; if ( $payby eq 'CARD' ) { $payinfo = $cust_pay_pending->paymask; } elsif ( $payby eq 'CHEK' ) { my( $account, $aba ) = split('@', $cust_pay_pending->paymask ); $payinfo = mt("ABA [_1], Acct #[_2]",$aba,$account); } else { $payinfo = $cust_pay_pending->payinfo; } my $target = "$payby$payinfo"; $payby = translate_payby($payby,$payinfo); my $info = $payby ? "($payby$payinfo)" : ''; my %statusaction = ( 'new' => 'delete', 'thirdparty' => 'delete', 'pending' => 'complete', 'captured' => 'capture', ); my $edit_pending = $FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments'); my $status = "Status: ".$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' => mt($action), 'color' => '#ff0000', 'width' => 655, 'height' => ( $action eq 'delete' ? 480 : 575 ), 'actionlabel' => mt(ucfirst($action). ' pending payment'), ); }