diff --git a/VERSION.txt b/VERSION.txt index ef0ff164084a..ca69410c4af0 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.7.9 \ No newline at end of file +5.7.10 \ No newline at end of file diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php index 6677d9839afa..f6ae18029457 100644 --- a/app/Http/Controllers/ImportController.php +++ b/app/Http/Controllers/ImportController.php @@ -173,6 +173,9 @@ class ImportController extends Controller public function import(ImportRequest $request) { + /** @var \App\Models\User $user */ + $user = auth()->user(); + $data = $request->all(); if (empty($data['hash'])) { @@ -188,7 +191,7 @@ class ImportController extends Controller } unset($data['files']); - CSVIngest::dispatch($data, auth()->user()->company()); + CSVIngest::dispatch($data, $user->company()); return response()->json(['message' => ctrans('texts.import_started')], 200); } diff --git a/app/Jobs/Entity/CreateRawPdf.php b/app/Jobs/Entity/CreateRawPdf.php index 921879021c61..593566577b9b 100644 --- a/app/Jobs/Entity/CreateRawPdf.php +++ b/app/Jobs/Entity/CreateRawPdf.php @@ -220,7 +220,7 @@ class CreateRawPdf implements ShouldQueue */ private function checkEInvoice(string $pdf): string { - if(!$this->entity instanceof Invoice) + if(!$this->entity instanceof Invoice || !$this->company->getSetting('enable_e_invoice')) return $pdf; $e_invoice_type = $this->entity->client->getSetting('e_invoice_type'); diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.php index eb4c1772236a..20f119b0c94f 100644 --- a/app/Models/BaseModel.php +++ b/app/Models/BaseModel.php @@ -105,22 +105,22 @@ class BaseModel extends Model return $value; } - public function __call($method, $params) - { - $entity = strtolower(class_basename($this)); + // public function __call($method, $params) + // { + // $entity = strtolower(class_basename($this)); - if ($entity) { - $configPath = "modules.relations.$entity.$method"; + // if ($entity) { + // $configPath = "modules.relations.$entity.$method"; - if (config()->has($configPath)) { - $function = config()->get($configPath); + // if (config()->has($configPath)) { + // $function = config()->get($configPath); - return call_user_func_array([$this, $function[0]], $function[1]); - } - } + // return call_user_func_array([$this, $function[0]], $function[1]); + // } + // } - return parent::__call($method, $params); - } + // return parent::__call($method, $params); + // } /** * @param \Illuminate\Database\Eloquent\Builder $query diff --git a/config/ninja.php b/config/ninja.php index cac415703b6c..bf67009c9408 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -15,8 +15,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION','5.7.9'), - 'app_tag' => env('APP_TAG','5.7.9'), + 'app_version' => env('APP_VERSION','5.7.10'), + 'app_tag' => env('APP_TAG','5.7.10'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''),