From 42b35cdaeb0643630eda0513556a8e668fbcb8e2 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 12 Jun 2018 09:51:58 -0400 Subject: RT# 74435 - fixed errors in posting a echeck refund when no account is listed. Conflicts: httemplate/misc/payment.cgi --- httemplate/misc/process/payment.cgi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/process') diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index 717d57c85..5620b5b4b 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -90,6 +90,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 { @@ -208,6 +209,10 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) { my $error = ''; my $paynum = ''; +my $paydate; +if ($cust_payby->paydate) { $paydate = "$year-$month-01"; } +else { $paydate = "2037-12-01"; } + if ( $cgi->param('batch') ) { $error = 'Prepayment discounts not supported with batched payments' @@ -217,7 +222,7 @@ if ( $cgi->param('batch') ) { 'payby' => $payby, 'amount' => $amount, 'payinfo' => $payinfo, - 'paydate' => "$year-$month-01", + 'paydate' => $paydate, 'payname' => $payname, map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}} -- cgit v1.2.1