From addc10ef4e7ea451cef160434b6462dcbff99aff Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 7 Jan 2022 13:56:02 +1100 Subject: [PATCH] Hide expired quotes from client portal --- app/Http/Livewire/QuotesTable.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Livewire/QuotesTable.php b/app/Http/Livewire/QuotesTable.php index f52ee96fd945..e93d24ec6d06 100644 --- a/app/Http/Livewire/QuotesTable.php +++ b/app/Http/Livewire/QuotesTable.php @@ -49,6 +49,10 @@ class QuotesTable extends Component ->where('company_id', $this->company->id) ->where('client_id', auth('contact')->user()->client->id) ->where('status_id', '<>', Quote::STATUS_DRAFT) + ->where(function ($query){ + $query->whereDate('due_date', '>=', now()) + ->orWhereNull('due_date'); + }) ->where('is_deleted', 0) ->withTrashed() ->paginate($this->per_page);