Merge pull request #5657 from turbo124/v5-develop

Minor fixes
This commit is contained in:
David Bomba 2021-05-10 21:06:09 +10:00 committed by GitHub
commit b089cec622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 11 deletions

View File

@ -69,8 +69,10 @@ class Kernel extends ConsoleKernel
} }
if(config('queue.default') == 'database' && Ninja::isSelfHost()) { if(config('queue.default') == 'database' && Ninja::isSelfHost()) {
$schedule->command('queue:work')->everyMinute()->withoutOverlapping(); $schedule->command('queue:work')->everyMinute()->withoutOverlapping();
$schedule->command('queue:restart')->everyFiveMinutes()->withoutOverlapping(); $schedule->command('queue:restart')->everyFiveMinutes()->withoutOverlapping();
} }
} }

View File

@ -32,11 +32,14 @@ class CheckClientExistence
->where('email', auth('contact')->user()->email) ->where('email', auth('contact')->user()->email)
->whereNotNull('email') ->whereNotNull('email')
->distinct('company_id') ->distinct('company_id')
->whereNotNull('company_id')
->whereHas('client', function ($query) { ->whereHas('client', function ($query) {
return $query->whereNull('deleted_at'); return $query->whereNull('deleted_at');
}) })
->get(); ->get();
nlog($multiple_contacts);
if (count($multiple_contacts) == 0) { if (count($multiple_contacts) == 0) {
Auth::logout(); Auth::logout();

View File

@ -91,15 +91,15 @@ class StartMigration implements ShouldQueue
$archive = $zip->open(public_path("storage/{$this->filepath}")); $archive = $zip->open(public_path("storage/{$this->filepath}"));
$filename = pathinfo($this->filepath, PATHINFO_FILENAME); $filename = pathinfo($this->filepath, PATHINFO_FILENAME);
if($this->company->id == $this->company->account->default_company_id) // if($this->company->id == $this->company->account->default_company_id)
{ // {
$new_default_company = $this->company->account->companies->first(); // $new_default_company = $this->company->account->companies->first();
if ($new_default_company) { // if ($new_default_company) {
$this->company->account->default_company_id = $new_default_company->id; // $this->company->account->default_company_id = $new_default_company->id;
$this->company->account->save(); // $this->company->account->save();
} // }
} // }
$update_product_flag = $this->company->update_products; $update_product_flag = $this->company->update_products;
@ -128,8 +128,8 @@ class StartMigration implements ShouldQueue
Storage::deleteDirectory(public_path("storage/migrations/{$filename}")); Storage::deleteDirectory(public_path("storage/migrations/{$filename}"));
$this->company->account->default_company_id = $this->company->id; // $this->company->account->default_company_id = $this->company->id;
$this->company->account->save(); // $this->company->account->save();
$this->company->update_products = $update_product_flag; $this->company->update_products = $update_product_flag;
$this->company->save(); $this->company->save();

View File

@ -1,7 +1,7 @@
<footer class="app-footer"> <footer class="app-footer">
<div class="ml-auto"> <div class="ml-auto">
<span>Powered by</span> <span>Powered by</span>
<a href="https://invoiceninja.com">InvoiceNinja</a> &copy; 2018 Invoice Ninja LLC. <a href="https://invoiceninja.com">InvoiceNinja</a> &copy; 2021 Invoice Ninja LLC.
</div> </div>
</footer> </footer>