From 611110c35a29759e52744c06dd594142a8c83463 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 25 Aug 2021 16:58:23 +1000 Subject: [PATCH] FIxes for CompanyImport --- VERSION.txt | 2 +- app/Jobs/Company/CompanyImport.php | 14 ++++++++++++++ config/ninja.php | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index e230c8396d19..7d3cdbf0dd04 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.3.0 \ No newline at end of file +5.3.1 \ No newline at end of file diff --git a/app/Jobs/Company/CompanyImport.php b/app/Jobs/Company/CompanyImport.php index 2d626404e436..591c03bf33f5 100644 --- a/app/Jobs/Company/CompanyImport.php +++ b/app/Jobs/Company/CompanyImport.php @@ -984,6 +984,8 @@ class CompanyImport implements ShouldQueue $cu_array = (array)$cu; unset($cu_array['id']); + unset($cu_array['company_id']); + unset($cu_array['user_id']); $new_cu = CompanyUser::firstOrNew( ['user_id' => $user_id, 'company_id' => $this->company->id], @@ -1102,6 +1104,18 @@ class CompanyImport implements ShouldQueue unset($obj_array[$un]); } + if($class instanceof CompanyGateway){ + + if(Ninja::isHosted() && $obj_array['gateway_key'] == 'd14dd26a37cecc30fdd65700bfb55b23'){ + $obj_array['gateway_key'] = 'd14dd26a47cecc30fdd65700bfb67b34'; + } + + if(Ninja::isSelfHost() && $obj_array['gateway_key'] == 'd14dd26a47cecc30fdd65700bfb67b34'){ + $obj_array['gateway_key'] = 'd14dd26a37cecc30fdd65700bfb55b23'; + } + + } + $activity_invitation_key = false; if($class == 'App\Models\Activity'){ diff --git a/config/ninja.php b/config/ninja.php index e893d61c3b11..16d0f9c9be73 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.3.0', - 'app_tag' => '5.3.0', + 'app_version' => '5.3.1', + 'app_tag' => '5.3.1', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''),