evet
SELECT ITM.CODE AS Kodu, ITM.NAME AS Adı, TOT.ONHAND AS [Eldeki Miktar], (SELECT TOP 1 PRICE FROM LG_021_01_STLINE WHERE
STOCKREF = ITM.LOGICALREF AND (TRCODE = 1 OR (TRCODE = 14 AND BILLED = 0)) AND LPRODSTAT = 0 AND LINETYPE = 0 ORDER BY DATE_ DESC)
AS [Son Alış] FROM LG_021_01_GNTOTST TOT INNER JOIN LG_021_ITEMS ITM ON ITM.LOGICALREF = TOT.STOCKREF WHERE (TOT.INVENNO = - 1)
AND (ITM.ACTIVE = 0)