summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-03-13 09:21:11 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-03-13 09:21:11 -0400
commit77ed60f65f8d0ac605ccb3bbc3adfbfba203612d (patch)
treee74d47f245842a7815968eb9d2128eb67c84d582
parente4cf3ab8802bc3d0ce5914abf9fc2d6e767ba540 (diff)
RT# 82988 - V3 fix
-rw-r--r--FS/FS/cust_main.pm5
1 files changed, 5 insertions, 0 deletions
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');