1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Refactor quote filters

This commit is contained in:
David Bomba 2022-12-21 22:10:16 +11:00
parent 7290fcd05a
commit 6c9f8d03d6

View File

@ -86,12 +86,12 @@ class QuoteFilters extends QueryFilters
if (in_array('expired', $status_parameters)) { if (in_array('expired', $status_parameters)) {
$this->builder->orWhere('status_id', Quote::STATUS_SENT) $this->builder->orWhere('status_id', Quote::STATUS_SENT)
->where('due_date', '>=', now()->toDateString()); ->where('due_date', '<=', now()->toDateString());
} }
if (in_array('upcoming', $status_parameters)) { if (in_array('upcoming', $status_parameters)) {
$this->builder->orWhere('status_id', Quote::STATUS_SENT) $this->builder->orWhere('status_id', Quote::STATUS_SENT)
->where('due_date', '<=', now()->toDateString()) ->where('due_date', '>=', now()->toDateString())
->orderBy('due_date', 'DESC'); ->orderBy('due_date', 'DESC');
} }