Merge pull request #2028 from denisdulici/master

Admin not able to print/pdf signed invoice
This commit is contained in:
Denis Duliçi 2021-05-07 15:06:30 +03:00 committed by GitHub
commit dc6d53b649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,11 @@ class InvoiceShow extends FormRequest
return true; return true;
} }
// Allow admin to see signed invoice
if (user()->can('read-sales-invoices')) {
return true;
}
return $this->invoice->contact_id == user()->contact->id; return $this->invoice->contact_id == user()->contact->id;
} }