summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-06-12 09:51:58 -0400
committerChristopher Burger <burgerc@freeside.biz>2018-06-12 09:51:58 -0400
commit360f89789c45e1fd7cb84b1442d2f0c8353066d9 (patch)
tree2bfadf26b82c95ac6df124739590a07a7478bad2 /httemplate/edit/process
parentf079061ec1005edbb9d292377bf4eb1a769fa681 (diff)
RT# 74435 - fixed errors in posting a echeck refund when no account is listed.
Diffstat (limited to 'httemplate/edit/process')
-rwxr-xr-xhttemplate/edit/process/cust_refund.cgi8
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi
index 0a3d55036..77da8d5d2 100755
--- a/httemplate/edit/process/cust_refund.cgi
+++ b/httemplate/edit/process/cust_refund.cgi
@@ -71,6 +71,7 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) {
$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");
} else {
@@ -192,8 +193,9 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) {
my $refund = "$1$2";
$cgi->param('paynum') =~ /^(\d*)$/ or die "Illegal paynum!";
my $paynum = $1;
- my $paydate = $cgi->param('exp_year'). '-'. $cgi->param('exp_month'). '-01';
- $options{'paydate'} = $paydate if $paydate =~ /^\d{2,4}-\d{1,2}-01$/;
+ my $paydate;
+ if ($cust_payby->paydate) { $paydate = "$year-$month-01"; }
+ else { $paydate = "2037-12-01"; }
if ( $cgi->param('batch') ) {
@@ -201,7 +203,7 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) {
'payby' => $payby,
'amount' => $refund,
'payinfo' => $payinfo,
- 'paydate' => "$year-$month-01",
+ 'paydate' => $paydate,
'payname' => $payname,
'paycode' => 'C',
map { $_ => scalar($cgi->param($_)) }