[freeside-commits] freeside/FS/FS cust_main.pm, 1.285, 1.286 Schema.pm, 1.53, 1.54

Jeff Finucane,420,, jeff at wavetail.420.am
Thu Jun 14 17:58:44 PDT 2007


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

Modified Files:
	cust_main.pm Schema.pm 
Log Message:
store exp in cust_pay and pass to B:OP during refunds with paynum (#1662)

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- Schema.pm	21 May 2007 02:18:44 -0000	1.53
+++ Schema.pm	15 Jun 2007 00:58:41 -0000	1.54
@@ -527,6 +527,7 @@
                                                  # eventually
         'payinfo',  'varchar',   'NULL', 512, '', '', #see cust_main above
 	'paymask', 'varchar', 'NULL', $char_d, '', '', 
+        'paydate',  'varchar', 'NULL', 10, '', '', 
         'paybatch', 'varchar',   'NULL', $char_d, '', '', #for auditing purposes.
         'closed',    'char', 'NULL', 1, '', '', 
       ],

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -d -r1.285 -r1.286
--- cust_main.pm	9 Jun 2007 00:40:26 -0000	1.285
+++ cust_main.pm	15 Jun 2007 00:58:41 -0000	1.286
@@ -2567,10 +2567,11 @@
   $content{invoice_number} = $options{'invnum'}
     if exists($options{'invnum'}) && length($options{'invnum'});
 
+  my $paydate = '';
   if ( $method eq 'CC' ) { 
 
     $content{card_number} = $payinfo;
-    my $paydate = exists($options{'paydate'})
+    $paydate = exists($options{'paydate'})
                     ? $options{'paydate'}
                     : $self->paydate;
     $paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
@@ -2754,6 +2755,7 @@
        'payby'    => $method2payby{$method},
        'payinfo'  => $payinfo,
        'paybatch' => $paybatch,
+       'paydate'  => $paydate,
     } );
     my $error = $cust_pay->insert($options{'manual'} ? ( 'manual' => 1 ) : () );
     if ( $error ) {
@@ -3098,8 +3100,8 @@
 
     if ( $cust_pay ) {
       $content{card_number} = $payinfo = $cust_pay->payinfo;
-      #$self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
-      #$content{expiration} = "$2/$1";
+      $cust_pay->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/ &&
+      ($content{expiration} = "$2/$1");  # where available
     } else {
       $content{card_number} = $payinfo = $self->payinfo;
       $self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;



More information about the freeside-commits mailing list