summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-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 ) {