1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #6763 from turbo124/v5-develop

14 day trial
This commit is contained in:
David Bomba 2021-10-04 10:17:43 +11:00 committed by GitHub
commit a345452c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,9 +271,12 @@ class Account extends BaseModel
$trial_active = false;
//14 day trial
$duration = 60*60*24*14;
if ($trial_plan && $include_trial) {
$trial_started = $this->trial_started;
$trial_expires = Carbon::parse($this->trial_started)->addSeconds($this->trial_duration);
$trial_expires = Carbon::parse($this->trial_started)->addSeconds($duration);
if($trial_expires->greaterThan(now())){
$trial_active = true;