From 5fb8b90c0358e69523075a9dc8a153cd431a72db Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 22 Feb 2016 17:14:07 -0600 Subject: RT#39586 Manual check refunds cannot be unapplied [source_paynum field, reason bug fixes, link text] --- FS/FS/cust_pay.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FS/FS/cust_pay.pm') 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", }); } -- cgit v1.1