From: Christopher Burger Date: Wed, 7 Nov 2018 17:42:56 +0000 (-0500) Subject: RT# 74435 - fixed error where payment account no longer exists X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=31cbf9bbd1c7a71e09f49cd6c7dec3522c558e87 RT# 74435 - fixed error where payment account no longer exists --- diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi index 149213991..0a5324ad2 100755 --- a/httemplate/edit/cust_refund.cgi +++ b/httemplate/edit/cust_refund.cgi @@ -44,10 +44,14 @@ Date<% time2str($date_format, $cust_pay->_date) %> +% if ( $cust_payby ) { - Method<% $payby %> # <% $paymask %> - + Method + <% $payby %> # <% $paymask %> + + +% } % unless ( $paydate || $cust_pay->payby ne 'CARD' ) { # possibly other reasons: i.e. card has since expired @@ -134,10 +138,7 @@ % ? scalar($cgi->param('custpaybynum')) % : scalar(@cust_payby) && $cust_payby[0]->custpaybynum; -% if ($cust_pay) { - -% } -% else { +% if ( !$cust_payby ) { <& /elements/tr-select-cust_payby.html, 'cust_payby' => \@cust_payby, 'curr_value' => $custpaybynum, @@ -161,7 +162,7 @@

-% if ( !$cust_pay ) { +% if ( !$cust_payby ) {

-% } # end if cust_pay +% } # end if cust_payby % } else { @@ -234,10 +235,10 @@ if ( $cgi->param('paynum') =~ /^(\d+)$/ ) { unless $custnum == $cust_pay->custnum; } else { $custnum = $cust_pay->custnum; + $cgi->param(-name=>"custnum", -value=>$custnum) unless $cgi->param("custnum"); } # get custpayby - die "Can not find payby record!" - unless $cust_payby = qsearchs( + $cust_payby = qsearchs( 'cust_payby', { paymask => $cust_pay->paymask, custnum => $custnum } );