mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Merge pull request #4331 from beganovich/v4-fix-issue-with-getting-companies-for-migration
(v4) Fix issue with getting companies for migration
This commit is contained in:
commit
ec6b3a00cc
@ -14,16 +14,24 @@ class CompanyService
|
||||
public function start()
|
||||
{
|
||||
try {
|
||||
foreach (session(SESSION_USER_ACCOUNTS) as $company) {
|
||||
$account = Account::find($company->account_id);
|
||||
if (session(SESSION_USER_ACCOUNTS)) {
|
||||
foreach (session(SESSION_USER_ACCOUNTS) as $company) {
|
||||
$account = Account::find($company->account_id);
|
||||
|
||||
if ($account) {
|
||||
$this->companies[] = [
|
||||
'id' => $company->account_id,
|
||||
'name' => $account->name,
|
||||
'company_key' => $account->account_key,
|
||||
];
|
||||
if ($account) {
|
||||
$this->companies[] = [
|
||||
'id' => $account->id,
|
||||
'name' => $account->present()->name(),
|
||||
'company_key' => $account->account_key,
|
||||
];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->companies[] = [
|
||||
'id' => auth()->user()->account->id,
|
||||
'name' => auth()->user()->account->present()->name(),
|
||||
'company_key' => auth()->user()->account->account_key,
|
||||
];
|
||||
}
|
||||
|
||||
$this->isSuccessful = true;
|
||||
|
@ -3273,8 +3273,9 @@ $LANG = array(
|
||||
'migrate_intro_text' => 'We\'ve been working on next version of Invoice Ninja. Click the button below to start the migration.',
|
||||
'start_migration' => 'Start Migration',
|
||||
'auth' => 'Auth',
|
||||
'endpoint' => 'Endpont',
|
||||
'endpoint' => 'Endpoint',
|
||||
'migration' => 'Migration',
|
||||
'companies' => 'Companies',
|
||||
'welcome_to_the_new_version' => 'Welcome to the new version of Invoice Ninja',
|
||||
'download_data' => 'Press button below to download the data.',
|
||||
'migration_import' => 'Awesome! Now you are ready to import your migration. Go to your new installation to import your data',
|
||||
|
Loading…
Reference in New Issue
Block a user