fixed update company settings.
This commit is contained in:
parent
a03f36bb11
commit
b3a1c624ae
@ -4,7 +4,7 @@ namespace App\Listeners\Update\V20;
|
|||||||
|
|
||||||
use App\Abstracts\Listeners\Update as Listener;
|
use App\Abstracts\Listeners\Update as Listener;
|
||||||
use App\Events\Install\UpdateFinished as Event;
|
use App\Events\Install\UpdateFinished as Event;
|
||||||
use Illuminate\Support\Facades\DB;
|
use App\Models\Common\Company;
|
||||||
use App\Utilities\Overrider;
|
use App\Utilities\Overrider;
|
||||||
|
|
||||||
class Version203 extends Listener
|
class Version203 extends Listener
|
||||||
@ -32,13 +32,7 @@ class Version203 extends Listener
|
|||||||
{
|
{
|
||||||
$company_id = session('company_id');
|
$company_id = session('company_id');
|
||||||
|
|
||||||
$companies = DB::table('companies')
|
$companies = Company::cursor();
|
||||||
->whereNotExists(function ($query) {
|
|
||||||
$query->select('id')
|
|
||||||
->from('settings')
|
|
||||||
->where('key', 'invoice.payment_terms');
|
|
||||||
})
|
|
||||||
->cursor();
|
|
||||||
|
|
||||||
foreach ($companies as $company) {
|
foreach ($companies as $company) {
|
||||||
session(['company_id' => $company->id]);
|
session(['company_id' => $company->id]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user