summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pay.pm
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-02-22 17:14:07 -0600
committerJonathan Prykop <jonathan@freeside.biz>2016-02-23 08:36:37 -0600
commit5fb8b90c0358e69523075a9dc8a153cd431a72db (patch)
tree6daf94b37247b1325c1e300100187909d072cb5d /FS/FS/cust_pay.pm
parent1bb85d2484b3d9f45c2b1142951503ff1c54e2e9 (diff)
RT#39586 Manual check refunds cannot be unapplied [source_paynum field, reason bug fixes, link text]
Diffstat (limited to 'FS/FS/cust_pay.pm')
-rw-r--r--FS/FS/cust_pay.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm
index af76b89..620f6c6 100644
--- a/FS/FS/cust_pay.pm
+++ b/FS/FS/cust_pay.pm
@@ -444,7 +444,7 @@ sub void {
unless (ref($reason) || !$reason) {
$reason = FS::reason->new_or_existing(
- 'class' => 'X',
+ 'class' => 'P',
'type' => 'Void payment',
'reason' => $reason
);
@@ -920,7 +920,7 @@ sub refund_to_unapply {
'table' => 'cust_pay_refund',
'hashref' => { 'paynum' => $self->paynum },
'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",
});
}