tdietrich
09/21/2021, 6:55 PMSELECT
Item.ID,
ItemVendor.Vendor,
Item.ItemID,
Item.DisplayName,
BUILTIN.DF( Item.Class ) AS Category,
Item.Description,
Item.Cost AS PurchasePrice,
ROUND( Item.AverageCost, 2 ) AS AverageCost,
ROUND( Item.LastPurchasePrice, 2 ) AS LastPurchasePrice,
Item.TotalQuantityOnHand,
Item.SeasonalDemand,
Item.DemandModifier,
Item.Manufacturer,
Item.MPN,
Item.IsDropShipItem,
Item.IsSpecialOrderItem,
InventoryItemLocations.Location,
BUILTIN.DF( InventoryItemLocations.Location ) AS LocationName,
InventoryItemLocations.QuantityOnHand AS LocationQuantityOnHand,
InventoryItemLocations.ReorderPoint AS LocationReorderPoint,
InventoryItemLocations.QuantityAvailable AS LocationQuantityAvailable,
InventoryItemLocations.PreferredStockLevel AS LocationPreferredStockLevel,
InventoryItemLocations.QuantityCommitted AS LocationQuantityCommitted,
InventoryItemLocations.QuantityBackOrdered AS LocationQuantityBackOrdered,
InventoryItemLocations.QuantityOnOrder AS LocationQuantityOnOrder
FROM
ItemVendor
INNER JOIN Item ON
( Item.ID = ItemVendor.Item )
INNER JOIN InventoryItemLocations ON
( InventoryItemLocations.Item = ItemVendor.Item )
WHERE
( ItemVendor.PreferredVendor = 'T' )
AND ( Item.ItemType = 'InvtPart' )
AND ( Item.IsInactive = 'F' )
AND ( InventoryItemLocations.Location IN ( 1, 6 ) )
ORDER BY
Item.ItemID,
LocationName