mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Set the trial flag only once
This commit is contained in:
parent
3ce3187ec2
commit
7c3aaa4898
@ -437,7 +437,7 @@ class CreateTestData extends Command
|
||||
'company_id' => $client->company->id,
|
||||
]);
|
||||
|
||||
Document::factory()->count(5)->create([
|
||||
Document::factory()->count(1)->create([
|
||||
'user_id' => $client->user->id,
|
||||
'company_id' => $client->company_id,
|
||||
'documentable_type' => Vendor::class,
|
||||
|
@ -148,6 +148,7 @@ class NinjaPlanController extends Controller
|
||||
$account->plan_term = 'month';
|
||||
$account->plan_started = now();
|
||||
$account->plan_expires = now()->addDays(14);
|
||||
$account->is_trial=true;
|
||||
$account->save();
|
||||
}
|
||||
|
||||
@ -216,7 +217,7 @@ class NinjaPlanController extends Controller
|
||||
|
||||
if ($account) {
|
||||
//offer the option to have a free trial
|
||||
if (! $account->trial_started && ! $account->plan) {
|
||||
if (!$account->is_trial) {
|
||||
return $this->trial();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user