[freeside-commits] freeside/FS/FS pay_batch.pm,1.8,1.9

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Mar 20 21:01:54 PDT 2007


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

Modified Files:
	pay_batch.pm 
Log Message:
ticket 1436, ACH export format, return processing and autopost

Index: pay_batch.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/pay_batch.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pay_batch.pm	5 Feb 2007 17:21:09 -0000	1.8
+++ pay_batch.pm	21 Mar 2007 04:01:51 -0000	1.9
@@ -146,7 +146,7 @@
 
 I<filehandle> - open filehandle of results file.
 
-I<format> - "csv-td_canada_trust-merchant_pc_batch", "csv-chase_canada-E-xactBatch" or "PAP"
+I<format> - "csv-td_canada_trust-merchant_pc_batch", "csv-chase_canada-E-xactBatch", "ach-spiritone", or "PAP"
 
 =cut
 
@@ -334,6 +334,40 @@
       0;
     };
 
+  }elsif ( $format eq 'ach-spiritone' ) {
+
+    $filetype = "CSV";
+
+    @fields = (
+      '',            # Name
+      'paybatchnum', # ID:  Invoice number of the transaction
+      'aba',         # ABA Number for the transaction
+      'payinfo',     # Bank Account Number for the transaction
+      '',            # Transaction Type:  27 - debit
+      'paid',        # Amount:  Amount of the transaction.  Dollars and cents
+                     #          with decimal entered.
+      '',            # Default Transaction Type
+      '',            # Default Amount:  Dollars and cents with decimal entered.
+    );
+
+    $end_condition = sub {
+      '';
+    };
+
+    $hook = sub {
+      my $hash = shift;
+      $hash->{'_date'} = time;  # got a better one?
+      $hash->{'payinfo'} = $hash->{'payinfo'} . '@' . $hash->{'aba'};
+    };
+
+    $approved_condition = sub {
+      1;
+    };
+
+    $declined_condition = sub {
+      0;
+    };
+
 
   } else {
     return "Unknown format $format";



More information about the freeside-commits mailing list