mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 02:54:34 -04:00
Company Import
This commit is contained in:
parent
a2e994be82
commit
fe2c410ef7
@ -168,7 +168,7 @@ class CompanyExport implements ShouldQueue
|
|||||||
|
|
||||||
$this->export_data['company'] = $this->company->toArray();
|
$this->export_data['company'] = $this->company->toArray();
|
||||||
|
|
||||||
$this->export_data['company_gateways'] = $this->company->company_gateways->map(function ($company_gateway){
|
$this->export_data['company_gateways'] = $this->company->company_gateways->withTrashed()->cursor()->map(function ($company_gateway){
|
||||||
|
|
||||||
$company_gateway = $this->transformArrayOfKeys($company_gateway, ['company_id', 'user_id']);
|
$company_gateway = $this->transformArrayOfKeys($company_gateway, ['company_id', 'user_id']);
|
||||||
$company_gateway->config = decrypt($company_gateway->config);
|
$company_gateway->config = decrypt($company_gateway->config);
|
||||||
|
@ -1115,10 +1115,14 @@ class CompanyImport implements ShouldQueue
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (! array_key_exists($resource, $this->ids)) {
|
if (! array_key_exists($resource, $this->ids)) {
|
||||||
|
nlog($this->ids);
|
||||||
|
nlog($this->backup_file->payments);
|
||||||
throw new \Exception("Resource {$resource} not available.");
|
throw new \Exception("Resource {$resource} not available.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! array_key_exists("{$old}", $this->ids[$resource])) {
|
if (! array_key_exists("{$old}", $this->ids[$resource])) {
|
||||||
|
nlog($this->ids);
|
||||||
|
nlog($this->backup_file->payments);
|
||||||
throw new \Exception("Missing {$resource} key: {$old}");
|
throw new \Exception("Missing {$resource} key: {$old}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user