1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Only show paid invoices for ninja accounts

This commit is contained in:
Hillel Coren 2016-12-29 14:30:23 +02:00
parent 5e979ce5c8
commit d49988ed7a

View File

@ -234,6 +234,8 @@ class InvoiceRepository extends BaseRepository
->where('contacts.is_primary', '=', true)
->where('invoices.is_recurring', '=', false)
->where('invoices.is_public', '=', true)
// Only show paid invoices for ninja accounts
->whereRaw(sprintf("((accounts.account_key != '%s' and accounts.account_key != '%s') or invoices.invoice_status_id = %d)", env('NINJA_LICENSE_ACCOUNT_KEY'), NINJA_ACCOUNT_KEY, INVOICE_STATUS_PAID))
// This needs to be a setting to also hide the activity on the dashboard page
//->where('invoices.invoice_status_id', '>=', INVOICE_STATUS_SENT)
->select(