From e0cda24c09df15bd80241594435f92bc948f6cb3 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 28 Aug 2020 15:50:10 +1000 Subject: [PATCH 1/2] Add referral_code to company transformer --- app/Traits/GenerateMigrationResources.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index 641469f5d055..0333c1dce406 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -24,7 +24,9 @@ trait GenerateMigrationResources protected function getCompany() { return [ + 'referral_code' => $this->account->referral_code ?: '', 'account_id' => $this->account->id, + 'google_analytics_key' => $this->account->analytics_key ?: '', 'industry_id' => $this->account->industry_id, 'ip' => $this->account->ip, 'company_key' => $this->account->account_key, From a3029c4c74750857bf95bc5d32f532d71a179a10 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 29 Sep 2020 07:11:23 +1000 Subject: [PATCH 2/2] Fixes for invoice item types --- app/Traits/GenerateMigrationResources.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index 0333c1dce406..cb4d897bc51c 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -491,8 +491,12 @@ trait GenerateMigrationResources 'product_key' => $item->product_key, 'notes' => $item->notes, 'discount' => (float) $item->discount, - 'tax_name1' => $item->tax_name1, + 'tax_name1' => (string)$item->tax_name1, 'tax_rate1' => (float) $item->tax_rate1, + 'tax_name2' => (string) $item->tax_name2, + 'tax_rate2' => (float) $item->tax_rate2, + 'tax_name3' => (string) '', + 'tax_rate3' => (float) 0, 'date' => $item->created_at, 'custom_value1' => $item->custom_value1, 'custom_value2' => $item->custom_value2,