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

Update InvoiceDatatable.php

This commit is contained in:
David Bomba 2018-07-24 22:35:23 +10:00 committed by GitHub
parent 0ee6ac1d9a
commit 910424075f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ class InvoiceDatatable extends EntityDatatable
[
$entityType == ENTITY_INVOICE ? 'invoice_number' : 'quote_number',
function ($model) use ($entityType) {
if(Auth::user()->can('view', [ENTITY_INVOICE, $model])) {
if(Auth::user()->can('view', [$this->entityType, $model])) {
$str = link_to("{$entityType}s/{$model->public_id}/edit", $model->invoice_number, ['class' => Utils::getEntityRowClass($model)])->toHtml();
return $this->addNote($str, $model->private_notes);
}