mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fixes for reminder job
This commit is contained in:
parent
d0e7c018e0
commit
d4bfca46bc
@ -37,9 +37,12 @@ class FeesAndLimits
|
||||
|
||||
public $adjust_fee_percent = false;
|
||||
|
||||
public $is_enabled = true;
|
||||
|
||||
//public $gateway_type_id = 1;
|
||||
|
||||
public static $casts = [
|
||||
'is_enabled' => 'bool',
|
||||
'gateway_type_id' => 'int',
|
||||
'min_limit' => 'float',
|
||||
'max_limit' => 'float',
|
||||
|
@ -58,7 +58,7 @@ class ReminderJob implements ShouldQueue
|
||||
Invoice::where('next_send_date', Carbon::today()->format('Y-m-d'))->with('invitations')->cursor()->each(function ($invoice) {
|
||||
if ($invoice->isPayable()) {
|
||||
$reminder_template = $invoice->calculateTemplate('invoice');
|
||||
$invoice->service()->touchReminder($this->reminder_template)->save();
|
||||
$invoice->service()->touchReminder($reminder_template)->save();
|
||||
|
||||
$invoice->invitations->each(function ($invitation) use ($invoice, $reminder_template) {
|
||||
EmailEntity::dispatch($invitation, $invitation->company, $reminder_template);
|
||||
|
Loading…
Reference in New Issue
Block a user