From 63d5b49073cbde900f0018dc158cbafb00a9e203 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 5 Jan 2023 22:14:01 +1100 Subject: [PATCH] Fixes for quote filters --- app/Filters/QuoteFilters.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Filters/QuoteFilters.php b/app/Filters/QuoteFilters.php index 116e3ca537cb..e906f291d25b 100644 --- a/app/Filters/QuoteFilters.php +++ b/app/Filters/QuoteFilters.php @@ -85,12 +85,12 @@ class QuoteFilters extends QueryFilters } if (in_array('expired', $status_parameters)) { - $this->builder->orWhere('status_id', Quote::STATUS_SENT) + $this->builder->where('status_id', Quote::STATUS_SENT) ->where('due_date', '<=', now()->toDateString()); } if (in_array('upcoming', $status_parameters)) { - $this->builder->orWhere('status_id', Quote::STATUS_SENT) + $this->builder->where('status_id', Quote::STATUS_SENT) ->where('due_date', '>=', now()->toDateString()) ->orderBy('due_date', 'DESC'); }