From cb9a67063de7a4fe6e9a68c75d4ea409e8b93095 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 1 Aug 2016 11:07:44 +0300 Subject: [PATCH] Fix for grandfathered check --- app/Models/Account.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Models/Account.php b/app/Models/Account.php index 22dbeeb35cf5..f6778763a34c 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -1135,6 +1135,12 @@ class Account extends Eloquent switch ($feature) { // Pro + case FEATURE_TASKS: + case FEATURE_EXPENSES: + if (Utils::isNinja() && $this->company_id < EXTRAS_GRANDFATHER_COMPANY_ID) { + return true; + } + case FEATURE_CUSTOMIZE_INVOICE_DESIGN: case FEATURE_DIFFERENT_DESIGNS: case FEATURE_EMAIL_TEMPLATES_REMINDERS: @@ -1150,10 +1156,6 @@ class Account extends Eloquent case FEATURE_CUSTOM_URL: return $selfHost || !empty($planDetails); - case FEATURE_TASKS: - case FEATURE_EXPENSES: - return $selfHost || !empty($planDetails) || $planDetails['company_id'] < EXTRAS_GRANDFATHER_COMPANY_ID; - // Pro; No trial allowed, unless they're trialing enterprise with an active pro plan case FEATURE_MORE_CLIENTS: return $selfHost || !empty($planDetails) && (!$planDetails['trial'] || !empty($this->getPlanDetails(false, false)));