From: Mark Wells Date: Wed, 6 Mar 2013 21:04:58 +0000 (-0800) Subject: fix payment lookup when revoking batch payments, #18548 and #21117 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=4d6c585ae38708a210e331af82b427cd88c465c7;p=freeside.git fix payment lookup when revoking batch payments, #18548 and #21117 --- diff --git a/FS/FS/cust_pay_batch.pm b/FS/FS/cust_pay_batch.pm index 1db74ef71..30ddc3762 100644 --- a/FS/FS/cust_pay_batch.pm +++ b/FS/FS/cust_pay_batch.pm @@ -342,6 +342,11 @@ sub decline { if ( lc($old->status) eq 'approved' ) { # Void the payment my $cust_pay = qsearchs('cust_pay', { + custnum => $new->custnum, + batchnum => $new->batchnum + }); + # pre-3.0 style + $cust_pay ||= qsearchs('cust_pay', { custnum => $new->custnum, paybatch => $new->batchnum });