From: Christopher Burger Date: Wed, 13 Mar 2019 13:21:11 +0000 (-0400) Subject: RT# 82988 - V3 fix X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=77ed60f65f8d0ac605ccb3bbc3adfbfba203612d RT# 82988 - V3 fix --- diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index ff75eb63d..03300a075 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2775,6 +2775,10 @@ sub batch_card { ); } + my $paycode = $options{paycode} || ''; + my $batch_type = "DEBIT"; + $batch_type = "CREDIT" if $paycode eq 'C'; + my $oldAutoCommit = $FS::UID::AutoCommit; local $FS::UID::AutoCommit = 0; my $dbh = dbh; @@ -2787,6 +2791,7 @@ sub batch_card { my %pay_batch = ( 'status' => 'O', 'payby' => FS::payby->payby2payment($payby), + 'type' => $batch_type, ); $pay_batch{agentnum} = $self->agentnum if $conf->exists('batch-spoolagent');