Fixes for quote filters

This commit is contained in:
David Bomba 2023-01-05 22:14:01 +11:00
parent c5de8de343
commit 63d5b49073

View File

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