From 8cc02af5f02c09118764e4b763dcc9ebec08c2e3 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 26 Apr 2007 01:50:01 +0000 Subject: [PATCH] revert dodgy ACH hack from ticket 1436 --- FS/FS/pay_batch.pm | 25 +------------------------ httemplate/misc/download-batch.cgi | 2 +- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/FS/FS/pay_batch.pm b/FS/FS/pay_batch.pm index c09753449..86ef7b074 100644 --- a/FS/FS/pay_batch.pm +++ b/FS/FS/pay_batch.pm @@ -162,7 +162,6 @@ sub import_results { my $formatre; # for Fixed.+ my @values; my $begin_condition; - my $pre_hook; my $end_condition; my $end_hook; my $hook; @@ -341,7 +340,7 @@ sub import_results { @fields = ( '', # Name - 'custnum' , # ID: Customer number of the transaction + 'paybatchnum', # ID: Number of the transaction 'aba', # ABA Number for the transaction 'payinfo', # Bank Account Number for the transaction '', # Transaction Type: 27 - debit @@ -355,20 +354,6 @@ sub import_results { ''; }; - $pre_hook = sub { - my $hash = shift; - my @cust_pay_batch = # this is dodgy, it works due to autoposting - qsearch('cust_pay_batch', { 'custnum' => $hash->{'custnum'}+0, - 'status' => '' - } ); - if ( scalar(@cust_pay_batch) == 1 ) { - $hash->{'paybatchnum'} = $cust_pay_batch[0]->paybatchnum; - }else{ - return "can't find batch payment for customer number " .$hash->{custnum}; - } - ''; - }; - $hook = sub { my $hash = shift; $hash->{'_date'} = time; # got a better one? @@ -444,14 +429,6 @@ sub import_results { $hash{$field} = $value; } - if ( defined($pre_hook) ) { - my $error = &{$pre_hook}(\%hash); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - if ( &{$end_condition}(\%hash) ) { my $error = &{$end_hook}(\%hash, $total); if ( $error ) { diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi index 26c385ebc..da975376b 100644 --- a/httemplate/misc/download-batch.cgi +++ b/httemplate/misc/download-batch.cgi @@ -99,7 +99,7 @@ % % my( $account, $aba ) = split( '@', $cust_pay_batch->payinfo ); % my $payname=$cust_pay_batch->payname; $payname =~ tr/",/ /; #payinfo too? -% my $batchline = qq!"$payname","!.$cust_pay_batch->custnum. #dodgy, works for autoapply +% my $batchline = qq!"$payname","!.$cust_pay_batch->paybatchnum. % qq!","$aba","$account","27","!.$cust_pay_batch->amount. % qq!","27","0.00"!; % push @batchlines, $batchline; -- 2.11.0