From 53e40a4e6ac71185dd1151a73f8b92d3ca57d5fb Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 23 Nov 2020 13:07:32 +1100 Subject: [PATCH] Fixes for purging existing company --- app/Services/Migration/CompleteService.php | 4 +++- app/Traits/GenerateMigrationResources.php | 2 +- resources/lang/en/texts.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Services/Migration/CompleteService.php b/app/Services/Migration/CompleteService.php index 317da466a2b6..3ebf40629066 100644 --- a/app/Services/Migration/CompleteService.php +++ b/app/Services/Migration/CompleteService.php @@ -43,8 +43,10 @@ class CompleteService $files = []; foreach ($this->data as $companyKey => $companyData) { + $data[] = [ - 'company_key' => $companyKey, + 'company_index' => $companyKey, + 'company_key' => $companyData['data']['company']['company_key'], 'force' => $companyData['force'], ]; diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index a4708a7588f8..c08ca2e6fe81 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -773,7 +773,7 @@ trait GenerateMigrationResources 'date' => Carbon::parse($item->created_at)->toDateString(), 'custom_value1' => $item->custom_value1, 'custom_value2' => $item->custom_value2, - 'type_id' => $item->invoice_item_type_id, + 'type_id' => (string)$item->invoice_item_type_id, ]; } diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 3ddc2e308def..c93cd24e969a 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -3536,7 +3536,7 @@ $LANG = array( 'marked_credit_as_sent' => 'Successfully marked credit as sent', 'email_subject_payment_partial' => 'Email Partial Payment Subject', 'is_approved' => 'Is Approved', - 'migration_went_wrong' => 'Oops, something went wrong! Make sure you did proper setup with V2 of Invoice Ninja, before starting migration.', + 'migration_went_wrong' => 'Error: Make sure you did proper setup with V5 of Invoice Ninja, before starting migration.', 'cross_migration_message' => 'Cross account migration is not allowed. Make sure e-mail address is same on V4 and V5.', 'email_credit' => 'Email Credit', 'client_email_not_set' => 'Client does not have an email address set',