X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling_Batch.pm;h=ed853182bfc6e7699615979821c11330064892aa;hp=2975dff79be4a4aa38f0f2f6ef016c33283b0424;hb=6f08493827f30fe18fd99c32bbb1625b064017ec;hpb=59b1fe7b375932fc13c920eb6f02b8da61d4c8fe diff --git a/FS/FS/cust_main/Billing_Batch.pm b/FS/FS/cust_main/Billing_Batch.pm index 2975dff79..ed853182b 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');