summaryrefslogtreecommitdiff
path: root/httemplate/misc/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 11:08:59 -0400
commit42b35cdaeb0643630eda0513556a8e668fbcb8e2 (patch)
treeb7be235db2198c56ec2bb8bd535ea25ddebf96d5 /httemplate/misc/process
parent8196faffdbc0abc43ce346119a76430c8a242b56 (diff)
RT# 74435 - fixed errors in posting a echeck refund when no account is listed.
Conflicts: httemplate/misc/payment.cgi
Diffstat (limited to 'httemplate/misc/process')
-rw-r--r--httemplate/misc/process/payment.cgi7
1 files changed, 6 insertions, 1 deletions
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}}