[freeside-commits] freeside/FS/FS cust_pay.pm,1.78,1.79
Ivan,,,
ivan at wavetail.420.am
Fri Jul 9 23:23:45 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv19306
Modified Files:
cust_pay.pm
Log Message:
fix payinfo N/A upgrade, RT#8809
Index: cust_pay.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pay.pm,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -w -d -r1.78 -r1.79
--- cust_pay.pm 17 Jun 2010 19:45:45 -0000 1.78
+++ cust_pay.pm 10 Jul 2010 06:23:43 -0000 1.79
@@ -179,7 +179,7 @@
$error = $self->SUPER::insert;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
- return "error inserting $self: $error";
+ return "error inserting cust_pay: $error";
}
if ( $self->invnum ) {
@@ -192,11 +192,11 @@
$error = $cust_bill_pay->insert(%options);
if ( $error ) {
if ( $ignore_noapply ) {
- warn "warning: error inserting $cust_bill_pay: $error ".
+ warn "warning: error inserting cust_bill_pay: $error ".
"(ignore_noapply flag set; inserting cust_pay record anyway)\n";
} else {
$dbh->rollback if $oldAutoCommit;
- return "error inserting $cust_bill_pay: $error";
+ return "error inserting cust_bill_pay: $error";
}
}
}
@@ -756,13 +756,18 @@
# payinfo N/A upgrade
###
+ #XXX remove the 'N/A (tokenized)' part (or just this entire thing)
+
my @na_cust_pay = qsearch( {
'table' => 'cust_pay',
- 'hashref' => { 'payinfo' => 'N/A' },
- 'extra_sql' => "AND payby IN ( 'CARD', 'CHEK' )",
+ 'hashref' => {}, #could be encrypted# { 'payinfo' => 'N/A' },
+ 'extra_sql' => "WHERE ( payinfo = 'N/A' OR paymask = 'N/AA' OR paymask = 'N/A (tokenized)' ) AND payby IN ( 'CARD', 'CHEK' )",
} );
foreach my $na ( @na_cust_pay ) {
+
+ next unless $na->payinfo eq 'N/A';
+
my $cust_pay_pending =
qsearchs('cust_pay_pending', { 'paynum' => $na->paynum } );
$na->$_($cust_pay_pending->$_) for qw( payinfo paymask );
More information about the freeside-commits
mailing list