Logo Ürün Alım
select (select DEFINITION_ from LG_019_CLCARD where LOGICALREF=LG_019_01_STLINE.CLIENTREF) as tedarikci,AMOUNT,
case TRCURR when 1 then convert(decimal(18,2), ISNULL(PRICE/NULLIF(TRRATE,0),0))
when 13 THEN convert(decimal(18,2),ISNULL(PRICE/NULLIF(TRRATE,0),0)) when 20 THEN
convert(decimal(18,2),ISNULL(PRICE/NULLIF(TRRATE,0),0)) when 0 then ISNULL(LINENET/NULLIF(AMOUNT,0),0)
when 160 then ISNULL(LINENET/NULLIF(AMOUNT,0),0) END as PRICE,
convert(varchar,DATE_,103) as DATE_ from LG_019_01_STLINE where STOCKREF=6907
and (select IOCODE from LG_019_01_STFICHE where LOGICALREF=LG_019_01_STLINE.STFICHEREF and TRCODE=1)=1 order by DATE_ DESC