summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-03-10 19:12:20 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-03-11 09:14:22 -0400
commit6f08493827f30fe18fd99c32bbb1625b064017ec (patch)
tree4019237f1655cdf5f41fa38dc34e780c5265b700 /FS/FS/cust_main
parent59b1fe7b375932fc13c920eb6f02b8da61d4c8fe (diff)
RT# 82988 - Fixed so only formats that can handle electronic refunds can download those files
Diffstat (limited to 'FS/FS/cust_main')
-rw-r--r--FS/FS/cust_main/Billing_Batch.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Billing_Batch.pm b/FS/FS/cust_main/Billing_Batch.pm
index 2975dff..ed85318 100644
--- a/FS/FS/cust_main/Billing_Batch.pm
+++ b/FS/FS/cust_main/Billing_Batch.pm
@@ -83,6 +83,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;
@@ -95,6 +99,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');