Skip to content

A free open source IT asset/license management system

Fixed RB-21761 - pass checkout_qty as a string for MS teams

snipe2dedc12308b5
diff --git a/app/Notifications/CheckoutAccessoryNotification.php b/app/Notifications/CheckoutAccessoryNotification.php
index 81f1d6f49b..0ec07b8cbe 100644
--- a/app/Notifications/CheckoutAccessoryNotification.php
+++ b/app/Notifications/CheckoutAccessoryNotification.php
@@ -141,8 +141,8 @@ class CheckoutAccessoryNotification extends Notification
->addStartGroupToSection('activityText')
->fact(htmlspecialchars_decode($item->display_name), '', 'activityTitle')
->fact(trans('mail.assigned_to'), $target->display_name)
- ->fact(trans('general.qty'), $this->checkout_qty)
- ->fact(trans('mail.checkedout_from'), $item->location->name ? $item->location->name : '')
+ ->fact(trans('general.qty'), (string) ($this->checkout_qty ?? 1))
+ ->fact(trans('mail.checkedout_from'), $item->location?->name ?: '')
->fact(trans('mail.Accessory_Checkout_Notification').' by ', $admin->display_name)
->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
->fact(trans('mail.notes'), $note ?: '');