1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02: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)) {
$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');
}