mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Add promotion message in footer
This commit is contained in:
parent
7d03a4f38f
commit
60ec74b88d
@ -1110,6 +1110,14 @@ class Account extends Eloquent
|
||||
return ! empty($plan_details);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function hasActivePromo()
|
||||
{
|
||||
return $this->company->hasActivePromo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $plan_details
|
||||
*
|
||||
|
@ -199,6 +199,10 @@ class Company extends Eloquent
|
||||
|
||||
public function applyFreeYear()
|
||||
{
|
||||
if ($this->plan_started && $this->plan_started != '0000-00-00') {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->plan = PLAN_PRO;
|
||||
$this->plan_term = PLAN_TERM_YEARLY;
|
||||
$this->plan_price = PLAN_PRICE_PRO_MONTHLY;
|
||||
|
@ -132,6 +132,14 @@ class User extends Authenticatable
|
||||
return $this->account->isPro();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function hasActivePromo()
|
||||
{
|
||||
return $this->account->hasActivePromo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $feature
|
||||
*
|
||||
|
@ -470,7 +470,9 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
@if (Utils::isNinjaProd())
|
||||
@if (Auth::check() && Auth::user()->isTrial())
|
||||
@if (Auth::check() && Auth::user()->hasActivePromo())
|
||||
Your promotion will expire soon, <a href="javascript:showUpgradeModal()">click here</a> to upgrade now.
|
||||
@elseif (Auth::check() && Auth::user()->isTrial())
|
||||
{!! trans(Auth::user()->account->getCountTrialDaysLeft() == 0 ? 'texts.trial_footer_last_day' : 'texts.trial_footer', [
|
||||
'count' => Auth::user()->account->getCountTrialDaysLeft(),
|
||||
'link' => '<a href="javascript:showUpgradeModal()">' . trans('texts.click_here') . '</a>'
|
||||
|
Loading…
Reference in New Issue
Block a user