From 3f06e46762bdff29e79f97173d558f46ae01a661 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 19 Dec 2016 11:48:33 +0200 Subject: [PATCH] Fix recurring invoice search --- app/Ninja/Repositories/InvoiceRepository.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index afa5760e7d..8ba6c406c2 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -160,7 +160,10 @@ class InvoiceRepository extends BaseRepository if ($filter) { $query->where(function ($query) use ($filter) { $query->where('clients.name', 'like', '%'.$filter.'%') - ->orWhere('invoices.invoice_number', 'like', '%'.$filter.'%'); + ->orWhere('invoices.invoice_number', 'like', '%'.$filter.'%') + ->orWhere('contacts.first_name', 'like', '%'.$filter.'%') + ->orWhere('contacts.last_name', 'like', '%'.$filter.'%') + ->orWhere('contacts.email', 'like', '%'.$filter.'%'); }); } @@ -754,7 +757,7 @@ class InvoiceRepository extends BaseRepository $invoice->is_public = true; $invoice->save(); - + $invoice->markInvitationsSent(); }