Merge pull request #8787 from turbo124/v5-develop

v5.7.10
This commit is contained in:
David Bomba 2023-09-06 23:51:13 +10:00 committed by GitHub
commit 214484244d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 17 deletions

View File

@ -1 +1 @@
5.7.9 5.7.10

View File

@ -173,6 +173,9 @@ class ImportController extends Controller
public function import(ImportRequest $request) public function import(ImportRequest $request)
{ {
/** @var \App\Models\User $user */
$user = auth()->user();
$data = $request->all(); $data = $request->all();
if (empty($data['hash'])) { if (empty($data['hash'])) {
@ -188,7 +191,7 @@ class ImportController extends Controller
} }
unset($data['files']); unset($data['files']);
CSVIngest::dispatch($data, auth()->user()->company()); CSVIngest::dispatch($data, $user->company());
return response()->json(['message' => ctrans('texts.import_started')], 200); return response()->json(['message' => ctrans('texts.import_started')], 200);
} }

View File

@ -220,7 +220,7 @@ class CreateRawPdf implements ShouldQueue
*/ */
private function checkEInvoice(string $pdf): string private function checkEInvoice(string $pdf): string
{ {
if(!$this->entity instanceof Invoice) if(!$this->entity instanceof Invoice || !$this->company->getSetting('enable_e_invoice'))
return $pdf; return $pdf;
$e_invoice_type = $this->entity->client->getSetting('e_invoice_type'); $e_invoice_type = $this->entity->client->getSetting('e_invoice_type');

View File

@ -105,22 +105,22 @@ class BaseModel extends Model
return $value; return $value;
} }
public function __call($method, $params) // public function __call($method, $params)
{ // {
$entity = strtolower(class_basename($this)); // $entity = strtolower(class_basename($this));
if ($entity) { // if ($entity) {
$configPath = "modules.relations.$entity.$method"; // $configPath = "modules.relations.$entity.$method";
if (config()->has($configPath)) { // if (config()->has($configPath)) {
$function = config()->get($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 * @param \Illuminate\Database\Eloquent\Builder $query

View File

@ -15,8 +15,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => env('APP_VERSION','5.7.9'), 'app_version' => env('APP_VERSION','5.7.10'),
'app_tag' => env('APP_TAG','5.7.9'), 'app_tag' => env('APP_TAG','5.7.10'),
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''), 'api_secret' => env('API_SECRET', ''),