1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #5830 from turbo124/v5-develop

Fixes for import
This commit is contained in:
David Bomba 2021-05-26 20:01:22 +10:00 committed by GitHub
commit 84041ead51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class Kernel extends ConsoleKernel
$schedule->job(new RecurringInvoicesCron)->hourly()->withoutOverlapping();
$schedule->job(new AutoBillCron)->daily()->withoutOverlapping();
$schedule->job(new AutoBillCron)->dailyAt('00:30')->withoutOverlapping();
$schedule->job(new SchedulerCheck)->everyFiveMinutes();

View File

@ -95,6 +95,7 @@ class AutoBillCron
private function runAutoBiller(Invoice $invoice)
{
nlog("Firing autobill for {$invoice->company_id} - {$invoice->number}");
$invoice->service()->autoBill()->save();
}
}

View File

@ -1654,7 +1654,7 @@ class Import implements ShouldQueue
{
$current_db = config('database.default');
$local_company = Company::where('company_key', $this->company->company_key)->first();
$local_company = Company::on($current_db)->where('company_key', $this->company->company_key)->first();
MultiDB::setDb('db-ninja-01');
$ninja_company = Company::find(config('ninja.ninja_default_company_id'));