1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Add "uninvoiced" Task Filter

Allow to filter Tasks for those that are not yet invoiced
This commit is contained in:
Gonzalo Escarrá 2023-10-27 09:39:22 -05:00 committed by GitHub
parent e078b9637b
commit 1a135c32a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,7 @@ class TaskFilters extends QueryFilters
* Statuses we need to handle
* - all
* - invoiced
* - uninvoiced
*
* @param string $value The invoice status as seen by the client
* @return Builder
@ -80,6 +81,10 @@ class TaskFilters extends QueryFilters
$this->builder->whereNotNull('invoice_id');
}
if (in_array('uninvoiced', $status_parameters)) {
$this->builder->whereNull('invoice_id');
}
return $this->builder;
}