diff options
| -rw-r--r-- | FS/FS/cust_main.pm | 5 |
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'); |
