minor refactor for reminder jobs
This commit is contained in:
parent
667c1848dc
commit
d279a12547
1 changed files with 2 additions and 1 deletions
|
|
@ -87,7 +87,8 @@ class ReminderJob implements ShouldQueue
|
|||
$query->where('is_disabled', 0);
|
||||
})
|
||||
->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
|
||||
if($invoice->reminder_last_sent && Carbon::parse($invoice->reminder_last_sent)->startOfDay()->eq(now()->startOfDay())){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue