From 620c43fd6d9d589f26f4722622be8dd5b54f07ae Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 10 Dec 2025 11:33:08 -0800 Subject: [PATCH] fixes expected checkin Notification --- app/Notifications/ExpectedCheckinNotification.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Notifications/ExpectedCheckinNotification.php b/app/Notifications/ExpectedCheckinNotification.php index 9166dd41f5..8efc05d8ab 100644 --- a/app/Notifications/ExpectedCheckinNotification.php +++ b/app/Notifications/ExpectedCheckinNotification.php @@ -50,7 +50,12 @@ class ExpectedCheckinNotification extends Notification */ public function toMail() { - $today = Carbon::now(); + $today = Carbon::today(); + $expected = Carbon::parse($this->params->expected_checkin)->startOfDay(); + + $subjectText = $today->greaterThan($expected) + ? trans('mail.Expected_Checkin_Notification_Pastdue', ['name' => $this->params->display_name]) + : trans('mail.Expected_Checkin_Notification', ['name' => $this->params->display_name]); $message = (new MailMessage)->markdown('notifications.markdown.expected-checkin', [ @@ -60,7 +65,7 @@ class ExpectedCheckinNotification extends Notification 'serial' => $this->params->serial, 'asset_tag' => $this->params->asset_tag, ]) - ->subject('⏰'. ($today > $this->params->expected_checkin) ? trans('mail.Expected_Checkin_Notification_Pastdue', ['name' => $this->params->display_name]) : trans('mail.Expected_Checkin_Notification', ['name' => $this->params->display_name])) + ->subject('⏰'. $subjectText) ->withSymfonyMessage(function (Email $message) { $message->getHeaders()->addTextHeader( 'X-System-Sender', 'Snipe-IT'