[freeside-commits] freeside/FS/FS Conf.pm, 1.468.2.11, 1.468.2.12 Schema.pm, 1.317.2.12, 1.317.2.13 pay_batch.pm, 1.34.2.1, 1.34.2.2 cust_main.pm, 1.586.2.5, 1.586.2.6

Ivan,,, ivan at wavetail.420.am
Fri Oct 21 16:09:05 PDT 2011


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

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	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.317.2.12
retrieving revision 1.317.2.13
diff -u -w -d -r1.317.2.12 -r1.317.2.13
--- Schema.pm	16 Oct 2011 01:17:56 -0000	1.317.2.12
+++ Schema.pm	21 Oct 2011 23:09:03 -0000	1.317.2.13
@@ -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.34.2.1
retrieving revision 1.34.2.2
diff -u -w -d -r1.34.2.1 -r1.34.2.2
--- pay_batch.pm	16 Aug 2011 04:49:44 -0000	1.34.2.1
+++ pay_batch.pm	21 Oct 2011 23:09:03 -0000	1.34.2.2
@@ -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.468.2.11
retrieving revision 1.468.2.12
diff -u -w -d -r1.468.2.11 -r1.468.2.12
--- Conf.pm	17 Oct 2011 20:56:11 -0000	1.468.2.11
+++ Conf.pm	21 Oct 2011 23:09:03 -0000	1.468.2.12
@@ -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.586.2.5
retrieving revision 1.586.2.6
diff -u -w -d -r1.586.2.5 -r1.586.2.6
--- cust_main.pm	17 Oct 2011 20:56:12 -0000	1.586.2.5
+++ cust_main.pm	21 Oct 2011 23:09:03 -0000	1.586.2.6
@@ -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