From ab739ae358e8ae08cfe5cd63dd85799921bc9f12 Mon Sep 17 00:00:00 2001 From: Kristian Feldsam Date: Mon, 6 May 2019 00:51:01 +0200 Subject: [PATCH] Fix quote reminders - skip converted quotes (#2819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kristián Feldsam --- app/Ninja/Repositories/InvoiceRepository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index 6724a453bc99..8d0987e7eec6 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -1226,6 +1226,7 @@ class InvoiceRepository extends BaseRepository ->whereAccountId($account->id) ->where('balance', '>', 0) ->where('is_recurring', '=', false) + ->whereNull('quote_invoice_id') // skip converted quotes ->whereIsPublic(true) ->whereRaw('('.$sql.')') ->get(); @@ -1261,6 +1262,7 @@ class InvoiceRepository extends BaseRepository ->whereAccountId($account->id) ->where('balance', '>', 0) ->where('is_recurring', '=', false) + ->whereNull('quote_invoice_id') // skip converted quotes ->whereIsPublic(true) ->where('last_sent_date', '<', $lastSentDate);