Notification

Icon
Error

Default 'warranty' Report Adjustments or Clones - Change warranty reporting based on Purchase Date instead of Warranty End Date

Posted: Monday, October 14, 2019 7:22:07 PM(UTC)
Cripple.Zero

Cripple.Zero

Member Original PosterPosts: 18
0
Like
I would like to run a customized report based on the Warranty Expiration reports already in the LS product. However, instead of the manufacturer's warranty date, I would like to base it on the Purchase Date, +5 years. We are attempting to baseline a refresh plan for our assets, and the 'regime' before me just bought things willy-nilly with randomly-purchased warranties on all the hardware - there are warranties that are only 1 year long, 2 years and 3, where one actually has an extended up to 7 years.

Here is the code for the "Asset: Out of Warranty" report:
Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Serialnumber,
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblAssetCustom.Warrantydate < GetDate() And tblAssetCustom.State = 1 And
tblAssets.Assettype <> 66
Order By [Warranty Expiration] Desc


I have been playing around swapping different table names to try and conform around Purchase Date, but I can't seem to get it right. Then, presuming I'm able to finally get it adjusted, I wouldn't know how to add the 5 years to that date.

So, an asset purchased today in 2014, I would want the report to say that it was out of warranty today, this year; 5 years after purchase date.

In addition, not knowing if it is possible, I would similarly want the "Out of Warranty in 60 days" report adjusted to match so if an asset was purchased December 14th, 2014, that it would show up on that report today (technically my example here is over 60 days given how many days there are per month, but you get the picture).

Here is the code for the '60' day report:

Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Serialnumber,
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblAssetCustom.Warrantydate < GetDate() + 60 And
tblAssetCustom.Warrantydate > GetDate() And tblAssetCustom.State = 1
And tblAssets.Assettype <> 66
Order By [Warranty Expiration] Desc

Active Discussions

Lansweeper Hyper-V guests dissapeared and reappeared
by  Esben.D   Go to last post Go to first unread
Last post: Yesterday at 4:30:47 PM(UTC)
Lansweeper DB cleanup script
by  William382  
Go to last post Go to first unread
Last post: Yesterday at 4:23:43 PM(UTC)
Lansweeper Installing MS KB with Deploy
by  Esben.D   Go to last post Go to first unread
Last post: Yesterday at 4:01:45 PM(UTC)
Lansweeper Ticket Info Meter incorrect
by  pfalls  
Go to last post Go to first unread
Last post: Yesterday at 3:27:44 PM(UTC)
Lansweeper Asset Checkboxes in reports
by  ufficioced   Go to last post Go to first unread
Last post: Yesterday at 1:22:17 PM(UTC)
Lansweeper Silent "Run as logged in user" option
by  CyberCitizen  
Go to last post Go to first unread
Last post: Yesterday at 3:45:25 AM(UTC)
Lansweeper New ticket creation not emailing the user
by  MVMIC IT LANSWEEPER   Go to last post Go to first unread
Last post: 11/15/2019 5:36:23 PM(UTC)