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:
parent
7290fcd05a
commit
6c9f8d03d6
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user