minor refactor for reminder jobs

This commit is contained in:
David Bomba 2022-11-26 14:14:56 +11:00
parent 667c1848dc
commit d279a12547

View File

@ -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())){