From f6fced6b828c14e9f1e4c8a2ec1169a470bfd4a7 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 12 Mar 2020 17:25:51 +1100 Subject: [PATCH] Minor fixes for migration (#3484) --- app/Console/Commands/CreateTestData.php | 2 +- app/Traits/GenerateMigrationResources.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/CreateTestData.php b/app/Console/Commands/CreateTestData.php index e2088a7be08d..c095cf39614f 100644 --- a/app/Console/Commands/CreateTestData.php +++ b/app/Console/Commands/CreateTestData.php @@ -133,7 +133,7 @@ class CreateTestData extends Command $this->createInvoices($client); $this->createInvoices($client, true); - $this->createTasks($client); + // $this->createTasks($client); } } diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index 925a762a0d1e..1d64d88d3583 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -540,7 +540,7 @@ trait GenerateMigrationResources 'is_deleted' => $payment->is_deleted, 'exchange_rate' => $payment->exchange_rate ? number_format((float)$payment->exchange_rate, 6) : null, 'exchange_currency_id' => $payment->exchange_currency_id, - 'currency_id' => $payment->client->currency->id, + 'currency_id' => isset($payment->client->currency->id) ? $payment->client->currency->id : $this->account->currency_id, 'updated_at' => $payment->updated_at ? $payment->updated_at->toDateString() : null, 'created_at' => $payment->created_at ? $payment->created_at->toDateString() : null, 'deleted_at' => $payment->deleted_at ? $payment->deleted_at->toDateString() : null,