commit
84041ead51
3 changed files with 3 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue