1 <& elements/cust_pay_or_refund.html,
2 'thing' => 'pay_pending',
3 'amount_field' => 'paid',
4 'name_singular' => 'pending payment',
5 'name_verb' => 'pending',
7 'disable_by' => 1, #add otaker to cust_pay_pending?
8 'addl_header' => [ 'Time', 'Payment Status', ],
9 'addl_fields' => [ sub { time2str('%r', shift->_date ) },
12 'addl_sort_fields' => [ 'status' ],
13 'redirect_empty' => $redirect_empty,
19 'pending' => 'complete',
20 'authorized' => 'complete',
21 'captured' => 'capture',
23 #wouldn't need to take action on a done state#'done'
27 $FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments');
29 my $status_sub = sub {
31 my $return = $pending->status;
32 if ( $pending->failure_status ) {
33 $return = $pending->display_status;
35 my $action = $statusaction{$pending->status};
36 return $return unless $action && $edit_pending;
37 my $link = include('/elements/popup_link.html',
38 'action' => $p. 'edit/cust_pay_pending.html'.
39 '?paypendingnum='. $pending->paypendingnum.
44 'height' => ( $action eq 'delete' ? 480 : 575 ),
45 'actionlabel' => ucfirst($action). ' pending payment',
47 $return. qq! <FONT SIZE="-1">($link)</FONT>!;
50 my $redirect_empty = sub {
52 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
53 $p. "view/cust_main.cgi?$1";