A free open source IT asset/license management system
fixes expected checkin Notification
Godfrey M620c43fd6d9d
diff --git a/app/Notifications/ExpectedCheckinNotification.php b/app/Notifications/ExpectedCheckinNotification.phpindex 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'