Logo Banka Hesap Hareketleri
SELECT BNC.CODE + ‘ – ‘ + BNC.DEFINITION_ AS [Banka Kodu – Adi],
BNL.DATE_ AS Tarih, BNL.TRANNO AS [IslemNo.],
CASE bnl.TRCODE
WHEN 1 THEN ‘Banka Islem Fisi’ WHEN 2 THEN ‘Banka Virman Fisi’
WHEN 3 THEN ‘Gelen Havale-EFT’ WHEN 4 THEN ‘Gonderilen EFT/Havale’
WHEN 5 THEN ‘Banka Acilis Fisi’ WHEN 6 THEN ‘Banka Kur Farki Fisi’
WHEN 16 THEN ‘Banka Alinan Hizmet Faturasi’ WHEN 17 THEN ‘Banka Verilen Hizmet Faturasi’
WHEN 18 THEN ‘Bankadan Cek Odemesi’ WHEN 19 THEN ‘Bankadan Senet Odemesi’
END AS [Islem Turu],
(SELECT CODE FROM LG_215_BANKACC WHERE LOGICALREF=BNL.BNACCREF) AS [Hesap Kodu],
BNL.LINEEXP AS [Islem Aciklamasi],
ISNULL(CASE WHEN BNL.SIGN = 0 AND BNL.TRCURR = 0 THEN BNL.TRNET END, 0) AS [Borc TL],
ISNULL(CASE WHEN BNL.SIGN = 1 AND BNL.TRCURR = 0 THEN BNL.TRNET END, 0) AS [Alacak TL],
ISNULL(CASE WHEN BNL.SIGN = 0 AND BNL.TRCURR = 1 THEN BNL.TRNET END, 0) AS [Borc $],
ISNULL(CASE WHEN BNL.SIGN = 1 AND BNL.TRCURR = 1 THEN BNL.TRNET END, 0) AS [Alacak $],
ISNULL(CASE WHEN BNL.SIGN = 0 AND BNL.TRCURR = 20 THEN BNL.TRNET END, 0) AS [Borc €],
ISNULL(CASE WHEN BNL.SIGN = 1 AND BNL.TRCURR = 20 THEN BNL.TRNET END, 0) AS [Alacak €]FROM LG_215_BNCARD AS BNC
LEFT OUTER JOIN LG_215_01_BNFLINE AS BNL ON BNC.LOGICALREF = BNL.BANKREF
LEFT OUTER JOIN LG_215_01_BNFICHE AS BNF ON BNF.LOGICALREF = BNL.SOURCEFREF
WHERE (BNL.TRCODE IN (1, 2, 3, 4, 5, 6, 16, 17, 18, 19)) AND (BNL.TRANSTYPE NOT IN (3,2))
0 yorum:
Yorum Gönder