mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add helpers for paid plans
This commit is contained in:
parent
e6a3af5a54
commit
fb6fd8b084
@ -1 +1 @@
|
|||||||
5.7.62
|
5.7.63
|
@ -330,6 +330,33 @@ class Account extends BaseModel
|
|||||||
return $this->plan == 'enterprise';
|
return $this->plan == 'enterprise';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isEnterprisePaidClient(): bool
|
||||||
|
{
|
||||||
|
if (! Ninja::isNinja()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->isEnterpriseClient() && $this->isPaid();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isProClient(): bool
|
||||||
|
{
|
||||||
|
if (! Ninja::isNinja()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->plan == 'pro';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isProPaidClient(): bool
|
||||||
|
{
|
||||||
|
if (! Ninja::isNinja()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->isProClient() && $this->isPaid();
|
||||||
|
}
|
||||||
|
|
||||||
public function isTrial(): bool
|
public function isTrial(): bool
|
||||||
{
|
{
|
||||||
if (! Ninja::isNinja()) {
|
if (! Ninja::isNinja()) {
|
||||||
|
@ -17,8 +17,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => env('APP_VERSION', '5.7.62'),
|
'app_version' => env('APP_VERSION', '5.7.63'),
|
||||||
'app_tag' => env('APP_TAG', '5.7.62'),
|
'app_tag' => env('APP_TAG', '5.7.63'),
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', false),
|
'api_secret' => env('API_SECRET', false),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user