Merge pull request #16982 from grokability/fixes#16958-expiring-assets-unarchived

Fixed #16958 - exclude archived assets from expiring assets report
This commit is contained in:
snipe
2025-05-23 15:51:27 +02:00
committed by GitHub

View File

@@ -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()')