[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.12, 1.271.2.13 Schema.pm, 1.44.2.6, 1.44.2.7
Jeff Finucane,420,,
jeff at wavetail.420.am
Thu Jun 14 17:58:21 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv9885
Modified Files:
Tag: FREESIDE_1_7_BRANCH
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.44.2.6
retrieving revision 1.44.2.7
diff -u -d -r1.44.2.6 -r1.44.2.7
--- Schema.pm 21 May 2007 02:19:16 -0000 1.44.2.6
+++ Schema.pm 15 Jun 2007 00:58:18 -0000 1.44.2.7
@@ -526,6 +526,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.271.2.12
retrieving revision 1.271.2.13
diff -u -d -r1.271.2.12 -r1.271.2.13
--- cust_main.pm 9 Jun 2007 00:41:15 -0000 1.271.2.12
+++ cust_main.pm 15 Jun 2007 00:58:18 -0000 1.271.2.13
@@ -2566,10 +2566,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+$/;
@@ -2753,6 +2754,7 @@
'payby' => $method2payby{$method},
'payinfo' => $payinfo,
'paybatch' => $paybatch,
+ 'paydate' => $paydate,
} );
my $error = $cust_pay->insert($options{'manual'} ? ( 'manual' => 1 ) : () );
if ( $error ) {
@@ -3105,8 +3107,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