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:
parent
a7bd95a24f
commit
556babbf88
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user