mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 06:32:40 +01: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_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->config = decrypt($company_gateway->config);
|
||||
|
@ -1115,10 +1115,14 @@ class CompanyImport implements ShouldQueue
|
||||
return null;
|
||||
|
||||
if (! array_key_exists($resource, $this->ids)) {
|
||||
nlog($this->ids);
|
||||
nlog($this->backup_file->payments);
|
||||
throw new \Exception("Resource {$resource} not available.");
|
||||
}
|
||||
|
||||
if (! array_key_exists("{$old}", $this->ids[$resource])) {
|
||||
nlog($this->ids);
|
||||
nlog($this->backup_file->payments);
|
||||
throw new \Exception("Missing {$resource} key: {$old}");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user