X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay.pm;h=620f6c6296762b710012c0145f6c579f725c0813;hb=b1b3d6b3c0db38909b6f569e08877d2678587d22;hp=af76b8990a652bff4007de71a81bd72e4638377a;hpb=308694b3b6219171858f336681f4b265327fdc78;p=freeside.git diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index af76b8990..620f6c629 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", }); }