[freeside-commits] freeside/FS/FS Conf.pm, 1.479, 1.480 Schema.pm, 1.332, 1.333 pay_batch.pm, 1.35, 1.36 cust_main.pm, 1.592, 1.593

Ivan,,, ivan at wavetail.420.am
Fri Oct 21 16:08:17 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv25020/FS/FS

Modified Files:
	Conf.pm Schema.pm pay_batch.pm cust_main.pm 
Log Message:
agent-virt batches and batchconfig-eftcanada config (argh!), RT#14859

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.332
retrieving revision 1.333
diff -u -w -d -r1.332 -r1.333
--- Schema.pm	16 Oct 2011 01:17:48 -0000	1.332
+++ Schema.pm	21 Oct 2011 23:08:14 -0000	1.333
@@ -1383,6 +1383,7 @@
     'pay_batch' => { #batches of payments to an external processor
       'columns' => [
         'batchnum',   'serial',    '',   '', '', '', 
+        'agentnum',    'int', 'NULL', '', '', '', 
 	'payby',      'char',      '',    4, '', '', # CARD/CHEK
         'status',     'char', 'NULL',     1, '', '', 
         'download',   @date_type, '', '', 
@@ -1393,8 +1394,7 @@
       'index' => [],
     },
 
-    'cust_pay_batch' => { #what's this used for again?  list of customers
-                          #in current CARD batch? (necessarily CARD?)
+    'cust_pay_batch' => { #list of customers in current CARD/CHEK batch
       'columns' => [
         'paybatchnum',   'serial',    '',   '', '', '', 
         'batchnum',   'int',    '',   '', '', '', 

Index: pay_batch.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/pay_batch.pm,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -w -d -r1.35 -r1.36
--- pay_batch.pm	16 Aug 2011 04:49:43 -0000	1.35
+++ pay_batch.pm	21 Oct 2011 23:08:14 -0000	1.36
@@ -5,8 +5,9 @@
 use Time::Local;
 use Text::CSV_XS;
 use FS::Record qw( dbh qsearch qsearchs );
-use FS::cust_pay;
 use FS::Conf;
+use FS::cust_pay;
+use FS::agent;
 use Date::Parse qw(str2time);
 use Business::CreditCard qw(cardtype);
 
@@ -40,6 +41,8 @@
 
 =item batchnum - primary key
 
+=item agentnum - optional agent number for agent batches
+
 =item payby - CARD or CHEK
 
 =item status - O (Open), I (In-transit), or R (Resolved)
@@ -112,6 +115,7 @@
     $self->ut_numbern('batchnum')
     || $self->ut_enum('payby', [ 'CARD', 'CHEK' ])
     || $self->ut_enum('status', [ 'O', 'I', 'R' ])
+    || $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum')
   ;
   return $error if $error;
 

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.479
retrieving revision 1.480
diff -u -w -d -r1.479 -r1.480
--- Conf.pm	17 Oct 2011 20:56:13 -0000	1.479
+++ Conf.pm	21 Oct 2011 23:08:14 -0000	1.480
@@ -3253,6 +3253,14 @@
     'section'     => 'billing',
     'description' => 'Configuration for EFT Canada batching, four lines: 1. SFTP username, 2. SFTP password, 3. Transaction code, 4. Number of days to delay process date.',
     'type'        => 'textarea',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'batch-spoolagent',
+    'section'     => 'billing',
+    'description' => 'Store payment batches per-agent.',
+    'type'        => 'checkbox',
   },
 
   {

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.592
retrieving revision 1.593
diff -u -w -d -r1.592 -r1.593
--- cust_main.pm	17 Oct 2011 20:56:13 -0000	1.592
+++ cust_main.pm	21 Oct 2011 23:08:14 -0000	1.593
@@ -2481,6 +2481,7 @@
     'status' => 'O',
     'payby'  => FS::payby->payby2payment($payby),
   );
+  $pay_batch{agentnum} = $self->agentnum if $conf->exists('batch-spoolagent');
 
   my $pay_batch = qsearchs( 'pay_batch', \%pay_batch );
 



More information about the freeside-commits mailing list