X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling_Batch.pm;h=c1bb35f04f7d8e28bfe5c1c5a5f51bd2040ed421;hp=0e713e937be9f70d98a5dae544ede3325db49f00;hb=b48c02a92562395c84dbfe8c47db5c4ba14891a0;hpb=765aac1902113738afd1bcaee8eb25b44ee92e63 diff --git a/FS/FS/cust_main/Billing_Batch.pm b/FS/FS/cust_main/Billing_Batch.pm index 0e713e937..c1bb35f04 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');