mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:54:30 -04:00
Working on white label renewal
This commit is contained in:
parent
e9f05c7006
commit
4bcdc155c0
@ -74,6 +74,20 @@ class Company extends Eloquent
|
|||||||
return $price - ($price * $this->discount);
|
return $price - ($price * $this->discount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function daysUntilPlanExpires()
|
||||||
|
{
|
||||||
|
if ( ! $this->hasActivePlan()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Carbon::parse($this->plan_expires)->diffInDays(Carbon::today());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hasActivePlan()
|
||||||
|
{
|
||||||
|
return Carbon::parse($this->plan_expires) >= Carbon::today();
|
||||||
|
}
|
||||||
|
|
||||||
public function hasEarnedPromo()
|
public function hasEarnedPromo()
|
||||||
{
|
{
|
||||||
if ( ! Utils::isNinjaProd() || Utils::isPro()) {
|
if ( ! Utils::isNinjaProd() || Utils::isPro()) {
|
||||||
|
@ -2284,6 +2284,7 @@ $LANG = array(
|
|||||||
'debug' => 'Debug',
|
'debug' => 'Debug',
|
||||||
'https' => 'HTTPS',
|
'https' => 'HTTPS',
|
||||||
'require' => 'Require',
|
'require' => 'Require',
|
||||||
|
'license_expiring' => 'Note: Your license will expire in :count days, :link to renew it.'
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@
|
|||||||
]) !!}
|
]) !!}
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
@include('partials.white_label')
|
@include('partials.white_label', ['company' => Auth::user()->account->company])
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
{{ trans('texts.powered_by') }}
|
{{ trans('texts.powered_by') }}
|
||||||
|
|
||||||
{{-- Per our license, please do not remove or modify this section. --}}
|
{{-- Per our license, please do not remove or modify this section. --}}
|
||||||
{!! link_to('https://www.invoiceninja.com/?utm_source=powered_by', 'InvoiceNinja.com', ['target' => '_blank', 'title' => trans('texts.created_by', ['name' => 'Hillel Coren'])]) !!} -
|
{!! link_to('https://www.invoiceninja.com/?utm_source=powered_by', 'InvoiceNinja.com', ['target' => '_blank', 'title' => trans('texts.created_by', ['name' => 'Hillel Coren'])]) !!} -
|
||||||
{!! link_to(RELEASES_URL, 'v' . NINJA_VERSION, ['target' => '_blank', 'title' => trans('texts.trello_roadmap')]) !!} |
|
{!! link_to(RELEASES_URL, 'v' . NINJA_VERSION, ['target' => '_blank', 'title' => trans('texts.trello_roadmap')]) !!} |
|
||||||
|
|
||||||
@if (Auth::user()->account->hasFeature(FEATURE_WHITE_LABEL))
|
@if (Auth::user()->account->hasFeature(FEATURE_WHITE_LABEL))
|
||||||
{{ trans('texts.white_labeled') }}
|
{{ trans('texts.white_labeled') }}
|
||||||
|
@if ($company->hasActivePlan() && $company->daysUntilPlanExpires() <= 10)
|
||||||
|
- <b>{{ trans('texts.license_expiring', ['count' => $company->daysUntilPlanExpires(), 'link' => 'link']) }}</b>
|
||||||
|
@endif
|
||||||
@else
|
@else
|
||||||
<a href="#" onclick="showWhiteLabelModal()">{{ trans('texts.white_label_link') }}</a>
|
<a href="#" onclick="showWhiteLabelModal()">{{ trans('texts.white_label_link') }}</a>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user