mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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 ! empty($plan_details);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function hasActivePromo()
|
||||||
|
{
|
||||||
|
return $this->company->hasActivePromo();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param null $plan_details
|
* @param null $plan_details
|
||||||
*
|
*
|
||||||
|
@ -199,6 +199,10 @@ class Company extends Eloquent
|
|||||||
|
|
||||||
public function applyFreeYear()
|
public function applyFreeYear()
|
||||||
{
|
{
|
||||||
|
if ($this->plan_started && $this->plan_started != '0000-00-00') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->plan = PLAN_PRO;
|
$this->plan = PLAN_PRO;
|
||||||
$this->plan_term = PLAN_TERM_YEARLY;
|
$this->plan_term = PLAN_TERM_YEARLY;
|
||||||
$this->plan_price = PLAN_PRICE_PRO_MONTHLY;
|
$this->plan_price = PLAN_PRICE_PRO_MONTHLY;
|
||||||
|
@ -132,6 +132,14 @@ class User extends Authenticatable
|
|||||||
return $this->account->isPro();
|
return $this->account->isPro();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function hasActivePromo()
|
||||||
|
{
|
||||||
|
return $this->account->hasActivePromo();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $feature
|
* @param $feature
|
||||||
*
|
*
|
||||||
|
@ -470,7 +470,9 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@if (Utils::isNinjaProd())
|
@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', [
|
{!! trans(Auth::user()->account->getCountTrialDaysLeft() == 0 ? 'texts.trial_footer_last_day' : 'texts.trial_footer', [
|
||||||
'count' => Auth::user()->account->getCountTrialDaysLeft(),
|
'count' => Auth::user()->account->getCountTrialDaysLeft(),
|
||||||
'link' => '<a href="javascript:showUpgradeModal()">' . trans('texts.click_here') . '</a>'
|
'link' => '<a href="javascript:showUpgradeModal()">' . trans('texts.click_here') . '</a>'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user