1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for auto billing

This commit is contained in:
David Bomba 2022-08-07 16:47:37 +10:00
parent 16a6380e0d
commit 776da3b3ca
2 changed files with 7 additions and 3 deletions

View File

@ -14,10 +14,14 @@ namespace App\Jobs\Cron;
use App\Libraries\MultiDB;
use App\Models\Invoice;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class AutoBill
class AutoBill implements ShouldQueue
{
use Dispatchable;
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $tries = 1;

View File

@ -125,7 +125,7 @@ class RecurringService
if($this->recurring_entity instanceof RecurringInvoice && $this->recurring_entity->status_id == RecurringInvoice::STATUS_DRAFT){
$this->start()->save();
SendRecurring::dispatchNow($this->recurring_entity, $this->recurring_entity->company->db);
SendRecurring::dispatch($this->recurring_entity, $this->recurring_entity->company->db);
}
return $this->recurring_entity;