projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 32917 - updated tax report to show pre discount estimated tax
[freeside.git]
/
httemplate
/
edit
/
cust_refund.cgi
diff --git
a/httemplate/edit/cust_refund.cgi
b/httemplate/edit/cust_refund.cgi
index
f3dec98
..
0a5324a
100755
(executable)
--- a/
httemplate/edit/cust_refund.cgi
+++ b/
httemplate/edit/cust_refund.cgi
@@
-44,9
+44,14
@@
<TD ALIGN="right">Date</TD><TD BGCOLOR="#ffffff"><% time2str($date_format, $cust_pay->_date) %></TD>
</TR>
<TD ALIGN="right">Date</TD><TD BGCOLOR="#ffffff"><% time2str($date_format, $cust_pay->_date) %></TD>
</TR>
+% if ( $cust_payby ) {
<TR>
<TR>
- <TD ALIGN="right">Method</TD><TD BGCOLOR="#ffffff"><% $payby %> # <% $paymask %></TD>
+ <TD ALIGN="right">Method</TD><TD BGCOLOR="#ffffff">
+ <% $payby %> # <% $paymask %>
+ <INPUT TYPE="hidden" NAME="custpaybynum" VALUE="<% $cust_payby->custpaybynum %>">
+ </TD>
</TR>
</TR>
+% }
% unless ( $paydate || $cust_pay->payby ne 'CARD' ) { # possibly other reasons: i.e. card has since expired
<TR>
% unless ( $paydate || $cust_pay->payby ne 'CARD' ) { # possibly other reasons: i.e. card has since expired
<TR>
@@
-133,10
+138,7
@@
% ? scalar($cgi->param('custpaybynum'))
% : scalar(@cust_payby) && $cust_payby[0]->custpaybynum;
% ? 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,
<& /elements/tr-select-cust_payby.html,
'cust_payby' => \@cust_payby,
'curr_value' => $custpaybynum,
@@
-160,7
+162,7
@@
</TABLE>
<P>
</TABLE>
<P>
-% if ( !$cust_pay ) {
+% if ( !$cust_pay
by
) {
<DIV ID="cust_payby"
<% $custpaybynum ? 'STYLE="display:none"'
: ''
<DIV ID="cust_payby"
<% $custpaybynum ? 'STYLE="display:none"'
: ''
@@
-175,7
+177,7
@@
</TABLE>
</DIV>
</TABLE>
</DIV>
-% } # end if cust_pay
+% } # end if cust_pay
by
% } else {
<INPUT TYPE="hidden" NAME="payinfo" VALUE="">
% } else {
<INPUT TYPE="hidden" NAME="payinfo" VALUE="">
@@
-221,7
+223,7
@@
my $batch = $cgi->param('batch');
die "access denied"
unless $FS::CurrentUser::CurrentUser->refund_access_right($payby);
die "access denied"
unless $FS::CurrentUser::CurrentUser->refund_access_right($payby);
-my( $paynum, $cust_pay, $batchnum
) = (
'', '', '' );
+my( $paynum, $cust_pay, $batchnum
, $cust_payby ) = ( '',
'', '', '' );
if ( $cgi->param('paynum') =~ /^(\d+)$/ ) {
$paynum = $1;
$cust_pay = qsearchs('cust_pay', { paynum=>$paynum } )
if ( $cgi->param('paynum') =~ /^(\d+)$/ ) {
$paynum = $1;
$cust_pay = qsearchs('cust_pay', { paynum=>$paynum } )
@@
-233,7
+235,13
@@
if ( $cgi->param('paynum') =~ /^(\d+)$/ ) {
unless $custnum == $cust_pay->custnum;
} else {
$custnum = $cust_pay->custnum;
unless $custnum == $cust_pay->custnum;
} else {
$custnum = $cust_pay->custnum;
+ $cgi->param(-name=>"custnum", -value=>$custnum) unless $cgi->param("custnum");
}
}
+ # get custpayby
+ $cust_payby = qsearchs(
+ 'cust_payby', { paymask => $cust_pay->paymask, custnum => $custnum }
+ );
+
}
die "no custnum or paynum specified!" unless $custnum;
}
die "no custnum or paynum specified!" unless $custnum;