From a553bb8dff3128ee7a74593a129208c9f2ab113d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 7 Apr 2021 07:52:13 +1000 Subject: [PATCH 1/2] migrate client task rate --- app/Traits/GenerateMigrationResources.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index a33f0214d585..b1fa52bb6596 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -298,9 +298,12 @@ info("get company"); $settings = new \stdClass(); $settings->currency_id = $client->currency_id ? (string) $client->currency_id : (string) $client->account->currency_id; - if ($client->language_id) { + if($client->task_rate && $client->task_rate > 0) + $settings->default_task_rate = (float)$client->task_rate; + + if ($client->language_id) $settings->language_id = (string)$client->language_id; - } + return $settings; } @@ -418,7 +421,7 @@ info("get company"); $credits = []; $export_credits = Invoice::where('account_id', $this->account->id) - ->where('balance', '<', '0') + ->where('amount', '<', '0') ->where('invoice_type_id', '=', INVOICE_TYPE_STANDARD) ->where('is_public', true) ->withTrashed() From 7184f0bcdc99d8f4a36ca0d451b1f7d46b4e091a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 7 Apr 2021 07:52:49 +1000 Subject: [PATCH 2/2] migrate client task rate --- app/Traits/GenerateMigrationResources.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index b1fa52bb6596..d8b04988b27a 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -421,7 +421,7 @@ info("get company"); $credits = []; $export_credits = Invoice::where('account_id', $this->account->id) - ->where('amount', '<', '0') + ->where('balance', '<', '0') ->where('invoice_type_id', '=', INVOICE_TYPE_STANDARD) ->where('is_public', true) ->withTrashed()