Bekleyen Sipariş Satış Raporu
Logo Yazılım dan Sql Managent tarafından Bekleyen Sipariş Satış Raporu için gerekli yerleri düzenledikten sonra aşağıdaki kodu çalıştırmanız yeterlidir.
SELECT Top 5 MONTH(DATE_) AS 'Ay', CONVERT(nvarchar(50),(DATE_),103) AS 'Sipariş Tarihi', (SELECT FICHENO FROM LG_001_01_ORFICHE F WHERE F.LOGICALREF=L.ORDFICHEREF) AS 'Sipariş No', (SELECT DOCODE FROM LG_001_01_ORFICHE F WHERE F.LOGICALREF=L.ORDFICHEREF) AS 'Belge No', (SELECT DEFINITION_ FROM LG_001_CLCARD C WHERE C.LOGICALREF= (SELECT CLIENTREF FROM LG_001_01_ORFICHE F WHERE F.LOGICALREF=L.ORDFICHEREF)) AS 'Cari Hesap Ünvanı', (SELECT NAME FROM LG_001_ITEMS WHERE LOGICALREF=L.STOCKREF) AS 'Stok Adı', (SELECT SPECODE FROM LG_001_01_ORFICHE F WHERE F.LOGICALREF=L.ORDFICHEREF) AS 'Özel Kod', AMOUNT AS 'Birim', CONVERT(nvarchar(50),(DUEDATE),103) AS 'Teslim Tarihi', DATEPART(WK, DUEDATE) AS 'Kaçıncı Hafta', Amount As 'Toplam Sipariş', SHIPPEDAMOUNT AS 'Sevkedilen Miktar', AMOUNT-SHIPPEDAMOUNT AS 'Kalan Miktar' FROM LG_001_01_ORFLINE L Where TRCODE=1 And MONTH(DATE_)>=1 And MONTH(DATE_)<=12 AND CLOSED=0 And (AMOUNT-SHIPPEDAMOUNT)>0 And CONVERT(nvarchar(50),(L.DATE_),103) Between '1.01.2016' And '31.12.2100' |
Paylaş: