From 3957d670d0b38505ab233ee42f66382392f5a389 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Thu, 22 Aug 2024 10:04:46 -0700 Subject: [PATCH] fixes send acceptance reminder query --- app/Console/Commands/SendAcceptanceReminder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/SendAcceptanceReminder.php b/app/Console/Commands/SendAcceptanceReminder.php index dd9e59f611..a11ea8e270 100644 --- a/app/Console/Commands/SendAcceptanceReminder.php +++ b/app/Console/Commands/SendAcceptanceReminder.php @@ -47,9 +47,10 @@ class SendAcceptanceReminder extends Command { $pending = CheckoutAcceptance::pending()->where('checkoutable_type', 'App\Models\Asset') ->whereHas('checkoutable', function($query) { - $query->where('archived', 0); + $query->where('accepted_at', null) + ->where('declined_at', null); }) - ->with(['assignedTo', 'checkoutable.assignedTo', 'checkoutable.model', 'checkoutable.adminuser']) + ->with(['assignedTo', 'checkoutable.assignedTo', 'checkoutable.model', 'checkoutable.admin']) ->get(); $count = 0;