Report to Lists All Assets for a Given Purchase Order
Updated: 16 Jul 2008
The following query lets you see all assets for a given PO number. Notice the WHERE clause at the end where you can substitute a parameter to allow you to specify a PO Number at runtime.
/*List PO, Receiving Slip Number and the Assets that where created when */
/* using the receiving process. Software items are not reported in this report. */
select j.name as 'PO Number', j.Description, i.name as 'Receiving Slip',
k.name as 'Asset', va.[Serial Number], va.[Asset Type], va.*
/* For more details on the POs and receiving slips, remove the two dashes at the beginning of the next line */
--, rec.*, li.*, i.*, k.*, j.*
from inv_parent_lines rec
join item i on rec.[_resourceguid] = i.[guid]-- Receiving slip
join Inv_Line_Items li
on rec.[parent line item id]=li.[line item id] -- PO
join item j on li.[_resourceguid] = j.guid
join vReceivingSlipAssoResource rs
on i.guid = rs.parentresourceguid
join item k on k.guid = rs.childresourceguid -- Asset
join vAsset va on rs.ChildResourceGuid = va._ResourceGuid
join vItem vi on vi.Guid = va._ResourceGuid
where j.name = '<Your PO Number Here>'
blog entry Filed Under:
The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.