summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-03-06 13:04:58 -0800
committerMark Wells <mark@freeside.biz>2013-03-06 13:04:58 -0800
commit4d6c585ae38708a210e331af82b427cd88c465c7 (patch)
treee6cdef63442890ab6cfed0edf6c325767c55d2dc
parentd5c51ff8d85f1f9ad64961878dcba6adb7968523 (diff)
fix payment lookup when revoking batch payments, #18548 and #21117
-rw-r--r--FS/FS/cust_pay_batch.pm5
1 files changed, 5 insertions, 0 deletions
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
@@ -343,6 +343,11 @@ sub decline {
# 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
});
if ( !$cust_pay ) {