summaryrefslogtreecommitdiff
path: root/httemplate/edit/cust_refund.cgi
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-11-07 12:42:56 -0500
committerChristopher Burger <burgerc@freeside.biz>2018-11-07 12:42:56 -0500
commit31cbf9bbd1c7a71e09f49cd6c7dec3522c558e87 (patch)
tree57db429c76287887e5db16512c67b11e5b68e116 /httemplate/edit/cust_refund.cgi
parent9f1847644038cdf5ca947a47cc3d4202eda0ac22 (diff)
RT# 74435 - fixed error where payment account no longer exists
Diffstat (limited to 'httemplate/edit/cust_refund.cgi')
-rwxr-xr-xhttemplate/edit/cust_refund.cgi21
1 files changed, 11 insertions, 10 deletions
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 @@
<TD ALIGN="right">Date</TD><TD BGCOLOR="#ffffff"><% time2str($date_format, $cust_pay->_date) %></TD>
</TR>
+% if ( $cust_payby ) {
<TR>
- <TD ALIGN="right">Method</TD><TD BGCOLOR="#ffffff"><% $payby %> # <% $paymask %></TD>
- <INPUT TYPE="hidden" NAME="custpaybynum" VALUE="<% $cust_payby->custpaybynum %>">
+ <TD ALIGN="right">Method</TD><TD BGCOLOR="#ffffff">
+ <% $payby %> # <% $paymask %>
+ <INPUT TYPE="hidden" NAME="custpaybynum" VALUE="<% $cust_payby->custpaybynum %>">
+ </TD>
</TR>
+% }
% unless ( $paydate || $cust_pay->payby ne 'CARD' ) { # possibly other reasons: i.e. card has since expired
<TR>
@@ -134,10 +138,7 @@
% ? scalar($cgi->param('custpaybynum'))
% : scalar(@cust_payby) && $cust_payby[0]->custpaybynum;
-% if ($cust_pay) {
- <INPUT TYPE="hidden" NAME="payinfo" VALUE="<% $payinfo %>" SIZE=10>
-% }
-% else {
+% if ( !$cust_payby ) {
<& /elements/tr-select-cust_payby.html,
'cust_payby' => \@cust_payby,
'curr_value' => $custpaybynum,
@@ -161,7 +162,7 @@
</TABLE>
<P>
-% if ( !$cust_pay ) {
+% if ( !$cust_payby ) {
<DIV ID="cust_payby"
<% $custpaybynum ? 'STYLE="display:none"'
: ''
@@ -176,7 +177,7 @@
</TABLE>
</DIV>
-% } # end if cust_pay
+% } # end if cust_payby
% } else {
<INPUT TYPE="hidden" NAME="payinfo" VALUE="">
@@ -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 }
);