summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-11-08 08:48:24 -0500
committerChristopher Burger <burgerc@freeside.biz>2018-11-08 08:48:24 -0500
commit28fd597fb26a3e4064e63f0cf9a23e06a273fb6e (patch)
tree3ad5d811c808a4170c856b1805fc3f1e9d5bb878 /httemplate/edit
parenteadb3075ac883f761c959a6dd60a358b40f1e499 (diff)
RT# 74453 - V3 fixes for backport
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-xhttemplate/edit/cust_refund.cgi9
-rwxr-xr-xhttemplate/edit/process/cust_refund.cgi22
2 files changed, 4 insertions, 27 deletions
diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi
index 39584c8eb..c79c39a80 100755
--- a/httemplate/edit/cust_refund.cgi
+++ b/httemplate/edit/cust_refund.cgi
@@ -46,7 +46,6 @@
<TR>
<TD ALIGN="right">Method</TD><TD BGCOLOR="#ffffff"><% $payby %> # <% $paymask %></TD>
- <INPUT TYPE="hidden" NAME="custpaybynum" VALUE="<% $cust_payby->custpaybynum %>">
</TR>
% unless ( $paydate || $cust_pay->payby ne 'CARD' ) { # possibly other reasons: i.e. card has since expired
@@ -160,7 +159,7 @@ my $batch = $cgi->param('batch');
die "access denied"
unless $FS::CurrentUser::CurrentUser->refund_access_right($payby);
-my( $paynum, $cust_pay, $batchnum, $cust_payby ) = ( '', '', '', '' );
+my( $paynum, $cust_pay, $batchnum ) = ( '', '', '' );
if ( $cgi->param('paynum') =~ /^(\d+)$/ ) {
$paynum = $1;
$cust_pay = qsearchs('cust_pay', { paynum=>$paynum } )
@@ -173,12 +172,6 @@ if ( $cgi->param('paynum') =~ /^(\d+)$/ ) {
} else {
$custnum = $cust_pay->custnum;
}
- # get custpayby
- die "Can not find payby record!"
- unless $cust_payby = qsearchs(
- 'cust_payby', { paymask => $cust_pay->paymask, custnum => $custnum }
- );
-
}
die "no custnum or paynum specified!" unless $custnum;
diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi
index 2b5f308c1..2b6f9cd52 100755
--- a/httemplate/edit/process/cust_refund.cgi
+++ b/httemplate/edit/process/cust_refund.cgi
@@ -21,6 +21,8 @@ die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Refund payment')
|| $FS::CurrentUser::CurrentUser->access_right('Post refund');
+my $conf = new FS::Conf;
+
$cgi->param('custnum') =~ /^(\d*)$/ or die "Illegal custnum!";
my $custnum = $1;
my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
@@ -64,25 +66,7 @@ if ( $cgi->param('paynum') > 0) {
});
}
-if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) {
-
- ##
- # use stored cust_payby info
- ##
-
- $cust_payby = qsearchs('cust_payby', { custnum => $custnum,
- custpaybynum => $custpaybynum, } )
- or die "unknown custpaybynum $custpaybynum";
-
- # not needed for realtime_bop, but still needed for batch_card
- $payinfo = $cust_payby->payinfo;
- $paymask = $cust_payby->paymask;
- $paycvv = $cust_payby->paycvv; # pass it if we got it, running a transaction will clear it
- ( $month, $year ) = $cust_payby->paydate_mon_year;
- $payname = $cust_payby->payname;
- $cgi->param(-name=>"paytype", -value=>$cust_payby->paytype) unless $cgi->param("paytype");
-
-} elsif ( $cgi->param('paynum') > 0) {
+if ( $cgi->param('paynum') > 0) {
$payinfo = $cust_pay->payinfo;
$payname = $cust_pay->payname;