mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
commit
84041ead51
@ -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();
|
||||
|
||||
|
@ -95,6 +95,7 @@ class AutoBillCron
|
||||
|
||||
private function runAutoBiller(Invoice $invoice)
|
||||
{
|
||||
nlog("Firing autobill for {$invoice->company_id} - {$invoice->number}");
|
||||
$invoice->service()->autoBill()->save();
|
||||
}
|
||||
}
|
||||
|
@ -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'));
|
||||
|
Loading…
Reference in New Issue
Block a user