From 6c9f8d03d6e011b6017438b8d51baff88a71f9a5 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 Dec 2022 22:10:16 +1100 Subject: [PATCH] Refactor 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 a545f76fdd..116e3ca537 100644 --- a/app/Filters/QuoteFilters.php +++ b/app/Filters/QuoteFilters.php @@ -86,12 +86,12 @@ class QuoteFilters extends QueryFilters if (in_array('expired', $status_parameters)) { $this->builder->orWhere('status_id', Quote::STATUS_SENT) - ->where('due_date', '>=', now()->toDateString()); + ->where('due_date', '<=', now()->toDateString()); } if (in_array('upcoming', $status_parameters)) { $this->builder->orWhere('status_id', Quote::STATUS_SENT) - ->where('due_date', '<=', now()->toDateString()) + ->where('due_date', '>=', now()->toDateString()) ->orderBy('due_date', 'DESC'); }