Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9760

Re: Query Reporting

$
0
0

Hi Thomas,

 

Try this:

 

SELECT T2.[SlpName], T0.[CardName], '' AS 'No Faktur',T0.[DocNum] 'INV SAP', T0.[DocType], T0.DocDate AS 'Tanggal Faktur', T1.[BaseRef] 'No. DO/SO', T0.[NumAtCard] 'No. PO',T1.[ItemCode], T1.[Dscription] 'Nama Barang', T5.[ItmsGrpNam] 'Brand', T0.[U_MIS_AEBuyer1] +'-'+ T6.[descr] 'AE Incharge', T0.[DocCur] 'CURR', T1.[Quantity] 'Qty', T1.[Price] 'Unit Price', T1.[LineTotal] 'Sub Total', T0.[DocRate] 'Kurs', T0.[DocTotal] - T0.[VatSum] - T0.[TotalExpns] + T0.[DpmAmnt] AS 'DPP',T0.[VatSum] 'PPN', T0.[DocTotal] 'TOTAL', T3.[PymntGroup] 'Due Date'

 

FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry LEFT JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode LEFT JOIN OCTG T3 ON T0.GroupNum = T3.GroupNum LEFT JOIN OITM T4 ON T1.ItemCode = T4.ItemCode LEFT JOIN OITB T5 ON T4.ItmsGrpCod = T5.ItmsGrpCod LEFT JOIN dbo.UFD1 T6 ON T0.U_MIS_AEBuyer1 = T6.FldValue AND T6.tableid = 'OINV' AND T6.FieldID = (SELECT distinct FieldID from CUFD WHERE AliasID= 'MIS_AEBuyer1')

 

where T0.[DocDate] >= [%0] and T0.[DocDate] <= [%1]

 

ORDER BY T2.[SlpName]


Viewing all articles
Browse latest Browse all 9760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>