1
0
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:
David Bomba 2021-01-18 21:59:24 +11:00
parent d0e7c018e0
commit d4bfca46bc
2 changed files with 4 additions and 1 deletions

View File

@ -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',

View File

@ -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);