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

Show expenses for archived clients/vendors

This commit is contained in:
Hillel Coren 2018-03-14 12:35:46 +02:00
parent d5974b45b2
commit 0b7621bd7d

View File

@ -54,8 +54,8 @@ class ExpenseRepository extends BaseRepository
->leftJoin('expense_categories', 'expenses.expense_category_id', '=', 'expense_categories.id')
->where('expenses.account_id', '=', $accountid)
->where('contacts.deleted_at', '=', null)
->where('vendors.deleted_at', '=', null)
->where('clients.deleted_at', '=', null)
//->where('vendors.deleted_at', '=', null)
//->where('clients.deleted_at', '=', null)
->where(function ($query) { // handle when client isn't set
$query->where('contacts.is_primary', '=', true)
->orWhere('contacts.is_primary', '=', null);