1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Invoice filter for expenses

This commit is contained in:
David Bomba 2023-06-27 21:26:34 +10:00
parent d944351a86
commit 1ecce29e56

View File

@ -106,6 +106,15 @@ class ExpenseFilters extends QueryFilters
return $this->builder;
}
public function has_invoices(string $value = ''): Builder
{
if ($value == 'true') {
return $this->builder->whereNotNull('invoice_id')->select('expenses.invoice_id');
}
return $this->builder;
}
/**
* Returns a list of expenses that can be matched to bank transactions
*/