X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay.pm;h=c55dd48b756a99f13c79119f534c9aef76c8c651;hb=649cb6a173a4278f3c4e0c960ce5b71422329222;hp=f15c85b870c5837a0fca4a1e0b949a992a0f243a;hpb=4b34c0c3dfc664793e5345c629e26c100e94aa22;p=freeside.git diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index f15c85b87..c55dd48b7 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -770,6 +770,11 @@ sub _upgrade_data { #class method my $cust_pay_pending = qsearchs('cust_pay_pending', { 'paynum' => $na->paynum } ); + unless ( $cust_pay_pending ) { + warn " *** WARNING: not-yet recoverable N/A card for payment ". + $na->paynum. " (no cust_pay_pending)\n"; + next; + } $na->$_($cust_pay_pending->$_) for qw( payinfo paymask ); my $error = $na->replace; if ( $error ) {