- Katılım
- 25 May 2018
- Mesajlar
- 1,610
- En iyi yanıt
- 14
- Puanları
- 113
- Konum
- İstanbul
- Web sitesi
- excelarsivi.com
- Ad Soyad
- Murat OSMA
- Office Vers.
- Microsoft 365 TR+EN
Logo'da Malzeme Stok Alış Satış Miktar ve Tutarları tablosu için bu sorguları kullanabilirsiniz.
[HIDEREPLYTHANKS]
[/HIDEREPLYTHANKS]
Sonuç Tablo

[HIDEREPLYTHANKS]
SQL:
SELECT "Ambar"."NAME" as "Ambar Adı", I."NAME" as "Malzeme Adı",
Sum(ST."ONHAND") as "Fiili Stok", Sum(ST."PURAMNT") as "Satınalma Miktarı",
Sum(ST."PURCASH") as "Satınalma Tutarı", Sum(ST."SALAMNT") as "Satış Miktarı",
Sum(ST."SALCASH") as "Satış Tutarı"
FROM (SELECT STINVTOT.*, ORT_DEGER= CASE WHEN (SELECT ISNULL(SUM(ONHAND),0)
FROM LV_115_01_STINVTOT WHERE STOCKREF=ITEMS.LOGICALREF AND INVENNO=0) =0 THEN 0
ELSE ONHAND*AVGVALUE/(SELECT ISNULL(SUM(ONHAND),100000000000)
FROM LV_115_01_STINVTOT WHERE STOCKREF=ITEMS.LOGICALREF AND
(STINVTOT.DATE_<>'5-19-1919' AND INVENNO=0) AND STINVTOT.INVENNO IN (0,1,2,3,4,5)) END
FROM LG_115_ITEMS ITEMS LEFT OUTER JOIN LV_115_01_STINVTOT STINVTOT ON
ITEMS.LOGICALREF=STINVTOT.STOCKREF WHERE STINVTOT.INVENNO IN (0,1,2,3,4,5)) ST
left outer join "dbo"."LG_115_ITEMS" I ON (ST."STOCKREF" = I."LOGICALREF")
left outer join (SELECT * FROM [L_CAPIWHOUSE]
WHERE FIRMNR='115') "Ambar" ON (ST."INVENNO" = "Ambar"."NR")
group by "Ambar"."NAME", I."NAME" order by "Ambar Adı", "Malzeme Adı"
Sonuç Tablo

Son düzenleme: