1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00

Fix for grandfathered check

This commit is contained in:
Hillel Coren 2016-08-01 11:08:14 +03:00
parent 58d3b355fb
commit babbf8ea71

View File

@ -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)));