X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_pay_pending.html;h=54c9935ef0e1bf08259b237223fce057605b6ffe;hb=cc839bbae9c4615a5d3d2b0c7edcfb0bae58b0ec;hp=f0a3a01506e2a71cea9b6bd5f388f28c7b7713cb;hpb=7621140d9f8945c54523c05bcac8e79693a16a52;p=freeside.git diff --git a/httemplate/search/cust_pay_pending.html b/httemplate/search/cust_pay_pending.html index f0a3a0150..54c9935ef 100755 --- a/httemplate/search/cust_pay_pending.html +++ b/httemplate/search/cust_pay_pending.html @@ -1,24 +1,23 @@ -<% include( 'elements/cust_pay_or_refund.html', +<& elements/cust_pay_or_refund.html, 'thing' => 'pay_pending', 'amount_field' => 'paid', 'name_singular' => 'pending payment', 'name_verb' => 'pending', 'disable_link' => 1, 'disable_by' => 1, #add otaker to cust_pay_pending? - 'html_init' => include('/elements/init_overlib.html'), 'addl_header' => [ 'Time', 'Payment Status', ], 'addl_fields' => [ sub { time2str('%r', shift->_date ) }, $status_sub, ], - ) -%> + 'redirect_empty' => $redirect_empty, +&> <%init> my %statusaction = ( 'new' => 'delete', 'pending' => 'complete', #'authorized' => '', - #'captured' => '', + 'captured' => 'capture', #'declined' => '', #wouldn't need to take action on a done state#'done' ); @@ -44,4 +43,13 @@ my $status_sub = sub { $return. qq! ($link)!; }; +my $redirect_empty = sub { + my $cgi = shift; + if ( $cgi->param('custnum') =~ /^(\d+)$/ ) { + $p. "view/cust_main.cgi?$1"; + } else { + ''; + } +}; +