projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 83450 - added fields interface and map_location to export
[freeside.git]
/
FS
/
FS
/
cust_main
/
Billing_Batch.pm
diff --git
a/FS/FS/cust_main/Billing_Batch.pm
b/FS/FS/cust_main/Billing_Batch.pm
index
0e713e9
..
c8292cd
100644
(file)
--- 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;
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),
my %pay_batch = (
'status' => 'O',
'payby' => FS::payby->payby2payment($payby),
+ 'type' => $batch_type,
);
$pay_batch{agentnum} = $self->agentnum if $conf->exists('batch-spoolagent');
);
$pay_batch{agentnum} = $self->agentnum if $conf->exists('batch-spoolagent');
@@
-146,7
+151,7
@@
sub batch_card {
),
'exp' => $options{paydate} || $cust_payby->paydate,
'payname' => $options{payname} || $cust_payby->payname,
),
'exp' => $options{paydate} || $cust_payby->paydate,
'payname' => $options{payname} || $cust_payby->payname,
- 'paytype' => $options{paytype} || $cust_payby->
paytype
,
+ 'paytype' => $options{paytype} || $cust_payby->
{'Hash'}->{'paytype'}
,
'amount' => $amount, # consolidating
'paycode' => $options{paycode} || '',
} );
'amount' => $amount, # consolidating
'paycode' => $options{paycode} || '',
} );