mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for projects in migration
This commit is contained in:
parent
b5fe5070b5
commit
8cbaac53c6
@ -756,18 +756,18 @@ info(print_r(array_keys($this->data),1));
|
|||||||
|
|
||||||
unset($modified['id']);
|
unset($modified['id']);
|
||||||
|
|
||||||
$invoice = $quote_repository->save(
|
$quote = $quote_repository->save(
|
||||||
$modified,
|
$modified,
|
||||||
QuoteFactory::create($this->company->id, $modified['user_id'])
|
QuoteFactory::create($this->company->id, $modified['user_id'])
|
||||||
);
|
);
|
||||||
|
|
||||||
$old_user_key = array_key_exists('user_id', $resource) ?? $this->user->id;
|
$old_user_key = array_key_exists('user_id', $resource) ?? $this->user->id;
|
||||||
|
|
||||||
$key = "invoices_{$resource['id']}";
|
$key = "quotes_{$resource['id']}";
|
||||||
|
|
||||||
$this->ids['quotes'][$key] = [
|
$this->ids['quotes'][$key] = [
|
||||||
'old' => $resource['id'],
|
'old' => $resource['id'],
|
||||||
'new' => $invoice->id,
|
'new' => $quote->id,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1164,14 +1164,13 @@ info(print_r(array_keys($this->data),1));
|
|||||||
|
|
||||||
$project = Project::Create($modified);
|
$project = Project::Create($modified);
|
||||||
|
|
||||||
$old_user_key = array_key_exists('user_id', $resource) ?? $this->user->id;
|
$key = "projects_{$resource['id']}";
|
||||||
|
|
||||||
$this->ids['projects'] = [
|
$this->ids['projects'][$key] = [
|
||||||
"projects_{$old_user_key}" => [
|
|
||||||
'old' => $resource['id'],
|
'old' => $resource['id'],
|
||||||
'new' => $project->id,
|
'new' => $project->id,
|
||||||
],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Project::reguard();
|
Project::reguard();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user