summaryrefslogtreecommitdiff
path: root/FS/FS/cust_credit.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/cust_credit.pm')
-rw-r--r--FS/FS/cust_credit.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm
index a598b37..4be4b17 100644
--- a/FS/FS/cust_credit.pm
+++ b/FS/FS/cust_credit.pm
@@ -1045,7 +1045,7 @@ sub refund_to_unapply {
'table' => 'cust_credit_refund',
'hashref' => { 'crednum' => $self->crednum },
'addl_from' => 'LEFT JOIN cust_refund USING (refundnum)',
- 'extra_sql' => "AND (cust_refund.closed = '' OR cust_refund.closed IS NULL)",
+ 'extra_sql' => "AND cust_refund.closed IS NULL AND cust_refund.source_paynum IS NULL",
});
}