From 93f836761db93f5777e50744562baec7e6ae3bdb Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 16 Dec 2022 10:02:29 +1100 Subject: [PATCH] Prevent relinking of payments with transactions --- app/Filters/PaymentFilters.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Filters/PaymentFilters.php b/app/Filters/PaymentFilters.php index e09c49e35557..c61c724dadf1 100644 --- a/app/Filters/PaymentFilters.php +++ b/app/Filters/PaymentFilters.php @@ -84,13 +84,11 @@ class PaymentFilters extends QueryFilters /** * Returns a list of payments that can be matched to bank transactions */ - public function match_transactions($value = '') + public function match_transactions($value) { - if($value == 'true') - { + if($value) return $this->builder->where('is_deleted',0)->whereNull('transaction_id'); - } return $this->builder; }