Skip to content

A free open source IT asset/license management system

if not location add default location

Godfrey M49021d277c70
diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php
index 35fa3fdf9d..5af7c17fa6 100644
--- a/app/Notifications/CheckinAssetNotification.php
+++ b/app/Notifications/CheckinAssetNotification.php
@@ -102,7 +102,7 @@ class CheckinAssetNotification extends Notification
->title("Asset Checked in")
->addStartGroupToSection('activityText')
->fact(htmlspecialchars_decode($item->present()->name), '', 'activityText')
- ->fact('Checked into ', $item->location->name ? $item->location->name : '')
+ ->fact('Checked into ', $item->location->name ? $item->location->name : $item->defaultLoc()->name)
->fact(trans('mail.Asset_Checkin_Notification')." by ", $admin->present()->fullName())
->fact('Asset Status', $item->assetstatus->name)
->fact('Notes', $note ?: 'No notes');
diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php
index 29f1cc254b..6a890c0991 100644
--- a/app/Notifications/CheckoutAssetNotification.php
+++ b/app/Notifications/CheckoutAssetNotification.php
@@ -138,7 +138,7 @@ class CheckoutAssetNotification extends Notification
->title("Asset Checked Out")
->addStartGroupToSection('activityText')
->fact(htmlspecialchars_decode($item->present()->name), '', 'activityText')
- ->fact('Checked out from ', $item->location ? $item->location->name : '')
+ ->fact('Checked out from ', $item->location ? $item->location->name : $item->assetLoc()->name)
->fact(trans('mail.Asset_Checkout_Notification') . " by ", $admin->present()->fullName())
->fact('Asset Status', $item->assetstatus->name)
->fact('Notes', $note ?: 'No notes');