From 7fb41b7d602eeb805de16658b22a93019871cf71 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 6 Jul 2021 07:53:32 +1000 Subject: [PATCH] Fixes for mime types --- app/Jobs/Company/CompanyImport.php | 4 ++-- app/Services/Client/ClientService.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Company/CompanyImport.php b/app/Jobs/Company/CompanyImport.php index 216ab6a1224e..2d626404e436 100644 --- a/app/Jobs/Company/CompanyImport.php +++ b/app/Jobs/Company/CompanyImport.php @@ -221,8 +221,8 @@ class CompanyImport implements ShouldQueue private function unzipFile() { - if(mime_content_type(Storage::path($this->file_location)) == 'text/plain') - return Storage::path($this->file_location); + // if(mime_content_type(Storage::path($this->file_location)) == 'text/plain') + // return Storage::path($this->file_location); $path = TempFile::filePath(Storage::get($this->file_location), basename($this->file_location)); diff --git a/app/Services/Client/ClientService.php b/app/Services/Client/ClientService.php index a33a576909f2..d12bc48ea930 100644 --- a/app/Services/Client/ClientService.php +++ b/app/Services/Client/ClientService.php @@ -60,7 +60,7 @@ class ClientService return Number::roundValue($credits->sum('balance'), $this->client->currency()->precision); } - public function getCredits() :Collection + public function getCredits() { return $this->client->credits() ->where('is_deleted', false)