Fix quote reminders - skip converted quotes (#2819)

Signed-off-by: Kristián Feldsam <feldsam@gmail.com>
This commit is contained in:
Kristian Feldsam 2019-05-06 00:51:01 +02:00 committed by David Bomba
parent 2e3d79a700
commit ab739ae358

View File

@ -1226,6 +1226,7 @@ class InvoiceRepository extends BaseRepository
->whereAccountId($account->id) ->whereAccountId($account->id)
->where('balance', '>', 0) ->where('balance', '>', 0)
->where('is_recurring', '=', false) ->where('is_recurring', '=', false)
->whereNull('quote_invoice_id') // skip converted quotes
->whereIsPublic(true) ->whereIsPublic(true)
->whereRaw('('.$sql.')') ->whereRaw('('.$sql.')')
->get(); ->get();
@ -1261,6 +1262,7 @@ class InvoiceRepository extends BaseRepository
->whereAccountId($account->id) ->whereAccountId($account->id)
->where('balance', '>', 0) ->where('balance', '>', 0)
->where('is_recurring', '=', false) ->where('is_recurring', '=', false)
->whereNull('quote_invoice_id') // skip converted quotes
->whereIsPublic(true) ->whereIsPublic(true)
->where('last_sent_date', '<', $lastSentDate); ->where('last_sent_date', '<', $lastSentDate);