Cevaplarınız için teşekkürler ,
Paytrans Ekstre çalışmamın en son hali aşağıdaki gibidir.
SELECT
CONVERT(VARCHAR,PT.DATE_,104)'Vade Tarihi',
CC.CODE CARÝ_KOD,
CC.DEFINITION_ ÜNVAN,
CASE(PT.MODULENR)
WHEN 3 THEN 'Sipariþ'
WHEN 4 THEN 'Fatura'
WHEN 5 THEN 'Cari Fiþ'
WHEN 6 THEN 'Çek - Senet'
WHEN 7 THEN 'Banka'
WHEN 10 THEN 'Kasa'
ELSE 'Diðer' END 'Tür',
--C.MODULENR, --Bu satýr Pasif Yapýlabilir.
CASE
WHEN (PT.MODULENR=4) AND (PT.TRCODE=2) THEN 'Perakende Satýþ Ýade Fat'
WHEN (PT.MODULENR=5) AND (PT.TRCODE=3) THEN 'BORÇ DEKONTU'
WHEN (PT.MODULENR=7) AND (PT.TRCODE=3) THEN 'Gelen Havale'
WHEN (PT.MODULENR=3) AND (PT.TRCODE=1) THEN 'Satýþ Sipariþi'
END 'Fiþ Türü',
PT.DOCODE [Belge No],
PT.MODULENR MODÜL,
PT.TRCODE 'TRCODE',
CASE WHEN PT.SIGN='1' THEN 'ALACAK'
WHEN PT.SIGN ='0' THEN 'BORÇ'
END DURUM,
CASE WHEN MONTH(PT.DISCDUEDATE)= '1' THEN 'Ocak'
WHEN MONTH(PT.DISCDUEDATE)= '2' THEN 'Þubat'
WHEN MONTH(PT.DISCDUEDATE)= '3' THEN 'Mart'
WHEN MONTH(PT.DISCDUEDATE)= '4' THEN 'Nisan'
WHEN MONTH(PT.DISCDUEDATE)= '5' THEN 'Mayýs'
WHEN MONTH(PT.DISCDUEDATE)= '6' THEN 'Haziran'
WHEN MONTH(PT.DISCDUEDATE)= '7' THEN 'Temmuz'
WHEN MONTH(PT.DISCDUEDATE)= '8' THEN 'Aðustos'
WHEN MONTH(PT.DISCDUEDATE)= '9' THEN 'Eylül'
WHEN MONTH(PT.DISCDUEDATE)= '10' THEN 'Ekim'
WHEN MONTH(PT.DISCDUEDATE)= '11' THEN 'Kasým'
WHEN MONTH(PT.DISCDUEDATE)= '12' THEN 'Aralýk'
END AY,
PT.TRCODE FÝÞ_TÜRÜ,
SUM(PT.TOTAL) TUTAR
FROM LG_XXX_01_PAYTRANS AS PT
INNER JOIN LG_XXX_CLCARD AS CC
ON PT.CARDREF = CC.LOGICALREF
WHERE CC.DEFINITION_ LIKE 'GÖNCÜ CANSU'
GROUP BY
CC.CODE,
PT.TRCODE,
PT.DISCDUEDATE,
PT.TOTAL,
CC.DEFINITION_,
PT.MODULENR,
PT.SIGN,
PT.DATE_,
PT.DOCODE
ORDER BY PT.DATE_