Malzeme kartına tanımlanan muhasebe kodlarının tablosu hk !

Gönderen Konu: Malzeme kartına tanımlanan muhasebe kodlarının tablosu hk !  (Okunma sayısı 443 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı kayseri

  • Yeni Kullanıcı
  • *
  • Karma: 0
Merhaba,

malzeme kartına tanımladığımız muhasebe kodları hangi tabloda tutuluyor, bir çok karttaki muhasebe kodlarını silmek istiyorum.

şimdiden teşekkür ederim.

vedat_ozer

  • Ziyaretçi
Selamlar,

Bunun için mutlaka çözüm ortağınıza başvurun sonuçta database bir şeyleri silerken başka bir arızaya neden olabilir. Bende zamanında bunun için excelde bir uygulama yapmıştım Ekleme,Değiştirme,Silme yapıyordu.

Sitede varmıdır bilmiyorum fakat kaynak olması açısında Stok ve Banka Muhasebe bilgilerini ekliyorum.

LG_XXX_CRDACREF tablosunun Trcode anlamları aşağıda ;
1 = 'Malzeme kartları'
3 = 'Hizmet kartları'
5 = 'Cari hesap kartları'
6 = 'Banka kartları'
8 = 'Kasa kartları'




Stok ;

Kod: [Seç]
SELECT
ITM.CODE,
ITM.NAME,
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=1 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Alımlar Hesabı],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=2 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Diğer Girişler],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=3 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satışlar Hesabı],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=4 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Diğer Çıkışlar],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=5 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Sarf],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=6 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Fireler],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=7 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Üretimden Girişler],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=8 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Kullanıcı Tanımlı Girişler],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=9 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Kullanıcı Tanımlı Çıkış],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=10 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satınalma İadeler],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=11 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satış İadeler],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=12 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satınalma İndirim],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=13 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satış İndirim],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=14 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satınalma Masraf],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=15 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satış Masraf],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=16 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Alınan Promosyon],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=17 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Verilen Promosyon],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=18 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Promosyon Kdv Gideri],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=95 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Sayım Fazlası],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=96 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Sayım Eksiği],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=99 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satılan Malın Maliyeti],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=135 AND ITM.LOGICALREF=B.CARDREF)),'') AS [İndirilen Ek Vergi],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=136 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satınalma Fiyat Farkı],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=137 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satış Fiyat Farkı],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=143 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Yurtdışı Satışlar],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=162 AND ITM.LOGICALREF=B.CARDREF)),'') AS [İhraç Kayıtlı Satışlar],
ISNULL((SELECT MK.CODE FROM LG_006_EMUHACC MK  WHERE MK.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_006_CRDACREF B  WHERE B.TRCODE = 1 AND B.TYP=199 AND ITM.LOGICALREF=B.CARDREF)),'') AS [Satılan Malın Maliyeti (TFRS)]
FROM    LG_006_ITEMS ITM  WHERE ITM.CARDTYPE NOT IN (22) 
ORDER BY ITM.CODE



Banka ;

Kod: [Seç]
SELECT
'Banka Kodu'=BANKA.CODE,
'Banka Adı'=BANKA.DEFINITION_,
'Hesap Kodu'=HESAP.CODE,
'Hesap Adı'=HESAP.DEFINITION_,
'Döviz Türü'=CASE WHEN HESAP.CARDTYPE = 1 THEN '(TH)' WHEN HESAP.CARDTYPE = 2 THEN '(KH)' WHEN HESAP.CARDTYPE = 3 THEN '(DT)' WHEN HESAP.CARDTYPE = 4 THEN '(DK)' WHEN HESAP.CARDTYPE = 5 THEN '(KK)' WHEN HESAP.CARDTYPE= 6 THEN '(KD)' END,
'Banka Cari Hesapları'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=1 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Tahsil Senetleri'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=2 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Takas Çekleri'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=3 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Kesilen Çekler'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=4 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Teminatsız Kredi'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=12 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Provizyon Masrafları'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=7 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Hizmet Komisyonları'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=5 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Puan Komisyonları'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=6 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Kredi Kartı Bloke'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=8 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Firma Kredi Kartı Bloke'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=18 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Vade Farkı Komisyonları'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=9 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Kur Farkı Alacak Hesabı'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=10 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Kur Farkı Borç Hesabı'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=11 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Kredi Faizi'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=13 AND HESAP.LOGICALREF=B.CARDREF)),''),
'BSMV'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=14 AND HESAP.LOGICALREF=B.CARDREF)),''),
'KKDF'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=15 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Kredi Masrafı'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=16 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Havale Masrafı'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=17 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Finansman Gideri'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=19 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Bankada Karşılıksız Çekler'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=20 AND HESAP.LOGICALREF=B.CARDREF)),''),
'Virman Masrafı'=ISNULL((SELECT MUHASEBE.CODE FROM LG_101_EMUHACC MUHASEBE  WHERE MUHASEBE.LOGICALREF =(SELECT B.ACCOUNTREF FROM  LG_101_CRDACREF B  WHERE B.TRCODE = 6 AND B.TYP=21 AND HESAP.LOGICALREF=B.CARDREF)),'')

FROM LG_101_BANKACC AS HESAP LEFT OUTER JOIN LG_101_BNCARD AS BANKA ON HESAP.BANKREF = BANKA.LOGICALREF

ORDER BY HESAP.CODE,BANKA.DEFINITION_
« Son Düzenleme: 10.09.2018, 12:44 Gönderen: Vedat ÖZER »

Çevrimdışı kayseri

  • Yeni Kullanıcı
  • *
  • Karma: 0
çok teşekkür ederim