mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-30 22:54:32 -04: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 $adjust_fee_percent = false;
|
||||||
|
|
||||||
|
public $is_enabled = true;
|
||||||
|
|
||||||
//public $gateway_type_id = 1;
|
//public $gateway_type_id = 1;
|
||||||
|
|
||||||
public static $casts = [
|
public static $casts = [
|
||||||
|
'is_enabled' => 'bool',
|
||||||
'gateway_type_id' => 'int',
|
'gateway_type_id' => 'int',
|
||||||
'min_limit' => 'float',
|
'min_limit' => 'float',
|
||||||
'max_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) {
|
Invoice::where('next_send_date', Carbon::today()->format('Y-m-d'))->with('invitations')->cursor()->each(function ($invoice) {
|
||||||
if ($invoice->isPayable()) {
|
if ($invoice->isPayable()) {
|
||||||
$reminder_template = $invoice->calculateTemplate('invoice');
|
$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) {
|
$invoice->invitations->each(function ($invitation) use ($invoice, $reminder_template) {
|
||||||
EmailEntity::dispatch($invitation, $invitation->company, $reminder_template);
|
EmailEntity::dispatch($invitation, $invitation->company, $reminder_template);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user