diff --git a/app/Filters/TaskFilters.php b/app/Filters/TaskFilters.php index 0c564af5a4..481fb44299 100644 --- a/app/Filters/TaskFilters.php +++ b/app/Filters/TaskFilters.php @@ -136,8 +136,13 @@ class TaskFilters extends QueryFilters $status_parameters = explode(',', $value); - if(count($status_parameters) >= 1) - $this->builder->whereIn('status_id', $this->transformKeys($status_parameters)); + if(count($status_parameters) >= 1){ + + $this->builder->where(function ($query) use ($status_parameters) { + $query->whereIn('status_id', $this->transformKeys($status_parameters))->whereNull('invoice_id'); + }); + + } return $this->builder; }