1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Update InvoiceService.php

This commit is contained in:
David Bomba 2018-07-24 22:36:26 +10:00 committed by GitHub
parent a7bd95a24f
commit 556babbf88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,7 @@ class InvoiceService extends BaseService
$query = $this->invoiceRepo->getInvoices($accountId, $clientPublicId, $entityType, $search) $query = $this->invoiceRepo->getInvoices($accountId, $clientPublicId, $entityType, $search)
->where('invoices.invoice_type_id', '=', $entityType == ENTITY_QUOTE ? INVOICE_TYPE_QUOTE : INVOICE_TYPE_STANDARD); ->where('invoices.invoice_type_id', '=', $entityType == ENTITY_QUOTE ? INVOICE_TYPE_QUOTE : INVOICE_TYPE_STANDARD);
if (! Utils::hasPermission('view_invoice')) { if (! Utils::hasPermission('view_' . $entityType)) {
$query->where('invoices.user_id', '=', Auth::user()->id); $query->where('invoices.user_id', '=', Auth::user()->id);
} }