1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Merge pull request #4494 from turbo124/master

Add account variables into migration
This commit is contained in:
David Bomba 2020-12-15 08:53:05 +11:00 committed by GitHub
commit 38ee8352d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View File

@ -226,6 +226,7 @@ class StepsController extends BaseController
$fileName = "{$accountKey}-{$date}-invoiceninja";
$localMigrationData['data'] = [
'account' => $this->getAccount(),
'company' => $this->getCompany(),
'users' => $this->getUsers(),
'tax_rates' => $this->getTaxRates(),

View File

@ -28,6 +28,26 @@ trait GenerateMigrationResources
{
protected $account;
protected function getAccount()
{
return [
'plan' => $this->account->company->plan,
'plan_term' =>$this->account->company->plan_term,
'plan_started' =>$this->account->company->plan_started,
'plan_paid' =>$this->account->company->plan_paid,
'plan_expires' =>$this->account->company->plan_expires,
'trial_started' =>$this->account->company->trial_started,
'trial_plan' =>$this->account->company->trial_plan,
'plan_price' =>$this->account->company->plan_price,
'num_users' =>$this->account->company->num_users,
'utm_source' =>$this->account->company->utm_source,
'utm_medium' =>$this->account->company->utm_medium,
'utm_campaign' =>$this->account->company->utm_campaign,
'utm_term' =>$this->account->company->utm_term,
'utm_content' =>$this->account->company->utm_content,
];
}
protected function getCompany()
{
return [