Skip to content

A free open source IT asset/license management system

Fixed #16958 - exclude archived assets from expiring assets report

snipea181ba308ac8
diff --git a/app/Models/Asset.php b/app/Models/Asset.php
index 4e953e74fc..002f238297 100644
--- a/app/Models/Asset.php
+++ b/app/Models/Asset.php
@@ -806,6 +806,7 @@ class Asset extends Depreciable
->whereNotNull('warranty_months')
->whereNotNull('purchase_date')
->whereNull('deleted_at')
+ ->NotArchived()
->whereRaw('DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) <= DATE_ADD(NOW(), INTERVAL '
. $days
. ' DAY) AND DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) > NOW()')