From 0f391e8c8ba82cb867c223003adbab9394ed239e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 9 Aug 2016 09:49:57 +0300 Subject: [PATCH] Fix for user permissions --- app/Models/Document.php | 8 ++++++++ app/Models/InvoiceItem.php | 10 +++++++++- app/Models/Task.php | 8 ++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/app/Models/Document.php b/app/Models/Document.php index ebf0855df1..f2d1e43d33 100644 --- a/app/Models/Document.php +++ b/app/Models/Document.php @@ -8,6 +8,14 @@ use DB; */ class Document extends EntityModel { + /** + * @return mixed + */ + public function getEntityType() + { + return ENTITY_DOCUMENT; + } + /** * @var array */ diff --git a/app/Models/InvoiceItem.php b/app/Models/InvoiceItem.php index 6598a24bed..303c437f91 100644 --- a/app/Models/InvoiceItem.php +++ b/app/Models/InvoiceItem.php @@ -13,6 +13,14 @@ class InvoiceItem extends EntityModel */ protected $dates = ['deleted_at']; + /** + * @return mixed + */ + public function getEntityType() + { + return ENTITY_INVOICE_ITEM; + } + /** * @var array */ @@ -20,7 +28,7 @@ class InvoiceItem extends EntityModel 'tax_name1', 'tax_rate1', 'tax_name2', - 'tax_rate2', + 'tax_rate2', ]; /** diff --git a/app/Models/Task.php b/app/Models/Task.php index bc771e70e3..11e9524201 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -14,6 +14,14 @@ class Task extends EntityModel use SoftDeletes; use PresentableTrait; + /** + * @return mixed + */ + public function getEntityType() + { + return ENTITY_TASK; + } + /** * @var string */