mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
minor refactor for reminder jobs
This commit is contained in:
parent
667c1848dc
commit
d279a12547
@ -87,7 +87,8 @@ class ReminderJob implements ShouldQueue
|
|||||||
$query->where('is_disabled', 0);
|
$query->where('is_disabled', 0);
|
||||||
})
|
})
|
||||||
->with('invitations')->cursor()->each(function ($invoice) {
|
->with('invitations')->cursor()->each(function ($invoice) {
|
||||||
if ($invoice->refresh() && $invoice->isPayable()) {
|
// if ($invoice->refresh() && $invoice->isPayable()) {
|
||||||
|
if ($invoice->isPayable()) {
|
||||||
|
|
||||||
//Attempts to prevent duplicates from sending
|
//Attempts to prevent duplicates from sending
|
||||||
if($invoice->reminder_last_sent && Carbon::parse($invoice->reminder_last_sent)->startOfDay()->eq(now()->startOfDay())){
|
if($invoice->reminder_last_sent && Carbon::parse($invoice->reminder_last_sent)->startOfDay()->eq(now()->startOfDay())){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user