[freeside-commits] freeside/FS/FS pay_batch.pm,1.8.2.2,1.8.2.3

Jeff Finucane,420,, jeff at wavetail.420.am
Wed Apr 25 18:50:53 PDT 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv5783/FS/FS

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	pay_batch.pm 
Log Message:
revert dodgy ACH hack from ticket 1436 (backport)

Index: pay_batch.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/pay_batch.pm,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -u -d -r1.8.2.2 -r1.8.2.3
--- pay_batch.pm	23 Apr 2007 03:42:40 -0000	1.8.2.2
+++ pay_batch.pm	26 Apr 2007 01:50:50 -0000	1.8.2.3
@@ -162,7 +162,6 @@
   my $formatre;      # for Fixed.+
   my @values;
   my $begin_condition;
-  my $pre_hook;
   my $end_condition;
   my $end_hook;
   my $hook;
@@ -341,7 +340,7 @@
 
     @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 @@
       '';
     };
 
-    $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 @@
       $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 ) {



More information about the freeside-commits mailing list